How to find which custom fields have unused or empty contexts?
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
In this article, we will delve into the topic of custom fields that contain stale contexts—those that are no longer associated with any active projects. As projects are deleted or archived over time, it can lead to the accumulation of these orphaned contexts. Regularly reviewing and cleaning up these contexts is essential to maintain relevance and optimize the system.
Environment
9.x
Solution
To retrieve a list of custom fields that have stale contexts, please use the following query.
1 2 3 4
SELECT fcs.fieldid FROM fieldconfigscheme fcs LEFT JOIN configurationcontext cc ON fcs.id = cc.fieldconfigscheme WHERE fcs.fieldid like '%customfield%' AND cc.fieldconfigscheme IS NULL;
Jira 9.12.x introduces notable enhancements to the Custom Field User Interface, which will only be visible when the corresponding dark feature is enabled. These UI modifications, when activated, may facilitate quicker filtering. However, it is advisable to test this feature in a staging environment before full implementation. For further details, please refer to the Jira Release Notes.
1
jira.customfields.configure.modern.ui.enabled
Was this helpful?