How to find which gadgets use a certain custom field
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Custom fields can be used in gadgets like two-dimensional filters and pie charts.
Admins may need to know how Jira custom fields are used in these gadgets and their respective dashboards but Jira doesn't offer a good way to report on the usage of a custom field.
Solution
Dashboards with gadgets using a certain custom field can be found in the DB as follows:
Find the custom field ID:
SELECT id FROM customfield WHERE cfname = 'Your custom field name';
Use the ID from the previous query to find the list of dashboards as well as their owners:
SELECT portalpage.id, portalpage.pagename, portalpage.username FROM portalpage INNER JOIN portletconfiguration ON portalpage.id = portletconfiguration.portalpage INNER JOIN gadgetuserpreference ON portletconfiguration.id = gadgetuserpreference.portletconfiguration WHERE userprefvalue = 'customfield_<custom_field_ID>';