Unable to retrieve all JIRA metadata. Error retrieving JIRA metadata.
問題
Confluence 5.4 introduced a new feature for JIRA traceability, whereby a new button appears on top of your page when there are connections between the page and JIRA or JIRA agile.
By clicking on the button you should get an error:
Unable to retrieve all JIRA metadata. Error retrieving JIRA metadata. Please check the logs for errors
また、atlassian-confluence.log
には次の内容が表示される。
ERROR [http-8090-4] [jira.service.helper.JiraMetadataErrorHelper] logError Error retrieving JIRA metadata. Please check the logs for errors
-- url: /rest/jira-metadata/1.0/metadata | userName: admin | referer: http:<IP address>:<port no>
com.atlassian.confluence.plugins.metadata.jira.exception.JiraMetadataException: java.lang.NullPointerException
at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper.handleException(SingleAppLinkMetadataHelper.java:159)
at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper.access$600(SingleAppLinkMetadataHelper.java:30)
at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper$1.call(SingleAppLinkMetadataHelper.java:109)
at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper$1.call(SingleAppLinkMetadataHelper.java:90)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.atlassian.confluence.plugins.metadata.jira.service.helper.JiraEpicPropertiesHelper.getEpicProperties(JiraEpicPropertiesHelper.java:52)
at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper$1.call(SingleAppLinkMetadataHelper.java:98)
... 6 more
診断
This issue can be caused when an upgrade of JIRA Agile is not completed properly, and there are duplicate custom-fields.
原因 1:
You are using JIRA Agile, and the upgrade of JIRA Agile is not completed properly. There are duplicate custom-fields.
This issue could be caused by the Epic Status. For example, there are two default Configuration schemes for the Epic Status field, and both of them contain an incomplete default configuration.
ソリューション
- Navigate to Administration >> Issues >> Custom Fields >> Epic Status. It's a locked field, and you should unlock it (To unlock the field you can visit: How to unlock a field).
If you click on the cog icon and press view, You can see that:
The first configured Scheme doesn't have Application contexts for scheme configured.
The second one has no Default value, and Options are not configured. - Remove the extra field and keep the default.
The values for this field (by default) are:
- Default Value: To Do
- Options: To Do, In Progress, Done
Prior to making the changes in your production instance, please give this a try in your test environment to make sure that it resolves the issue.