Cannot edit custom field issue type association
症状
- Whenever you try to edit the configuration of a custom field which associate to Bug and New Feature, the issue type context was set to Any Issue Type initially when you try to edit as follows:
- No matter how you select the prefer issue type and update, the changes will not take effects at all
原因
There could be some data integrity happens in the database which wrong id of fieldconfig
has association with the fieldconfigschemeissuetype
table.
回避策
警告
Please BACKUP your database before perform the below changes!
- If you're unsure of the below operation, please raise a support request in our support system for further clarification.
- Jira をシャットダウンします。
Get the ID of the custom field affected(eg. Product Manager) with the following SQL query:
select * from customfield where cfname = 'Product Manager';
In this case, the custom field id was 11323, you need replace the number with ID of your custom field. In this query, take note of the ID for fieldconfigscheme.
select * from fieldconfigscheme where fieldid like '%11323';
Run the following query to check if the fieldconfigscheme that attach with issue type and you will find there's different value under fieldconfiguration column and that column value should be identical.
select * from fieldconfigschemeissuetype where fieldconfigscheme = '11351'
Run a query to ensure the 3 configuration exist in JIRA database:
select * from fieldconfigscheme where fieldid like '%11323';
In this case(you may get different result), delete the 2entries from fieldconfiguration table and fieldconfigschemeissuetype. After that, update the remaining one of the entries from fieldconfigschemeissuetype table to null(eg. Any Issue Type in the context)
delete from fieldconfiguration where id in (11351,11391) delete from fieldconfigschemeissuetype where id in (12348,12349) update fieldconfigschemeissuetype set issuetype = null where id = 12347
- The fieldconfigschemeissuetype table will look as follow after the step 6 update:
- Jira を再起動します。
- Reindex JIRA
- Reconfigure the custom field issue type again