I am looking for a way to use the REST APIs to determine the Screens associated with a custom field. Basically I’m looking for the info from this Screens and Context info URL:
https://company.atlassian.net/secure/admin/ViewCustomFields.jspa
My goal is to remove custom fields that are no longer used in our Jira. We have at least 100 that haven’t been used in 2 years. I don’t want to have to click on each of those to determine the screens associated with the field.
1 Like
Hi @PaulPrachyl,
There is the Get Fields API method. You can read more about it here:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-search-get
Or, jump right into it and try out this API call:
https://company.atlassian.net/rest/api/3/field/search?maxResults=100&type=custom&expand=screensCount,lastUsed
Caveat: it doesn’t return a list of screens that use the custom field, but rather, just the number of screens, and the last time the custom field was used.
1 Like
Thanks, I’ve been using that Get Fields API, Is there anyway via an API to get the screen information, beyond the screen count. Many thanks @nmansilla
As far as I can see, this is not possible to do in a single query. For each custom field that has a screen count, you’d have to call the Get Screens for a Field API method.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-screens/#api-rest-api-3-field-fieldid-screens-get
1 Like
That is what I was looking for! I am also trying to get the project(s) associated with the screen for a specific field. Using the Jira UI, I can see that from this URL https://mycompany.com/secure/admin/ConfigureFieldScreen.jspa?id=screenId
This will allow me to associate “A customfield” to a Screen(s) then to a Project(s)
This is really useful, we would like to build out a google spreadsheet with this info, so we can understand the impact of deleting a custom field (associating it to screens and projects).
I am very familiar with using the Jira APIs, I just need to get the last bit of APIs to complete the task
Many thanks @nmansilla