How to Find Unused Issue Types in Jira Cloud Using REST API in Python
How to Find Unused Issue Types in Jira Cloud Using REST API in Python
November 15, 2021 edited
The algorithms is this:
Get all issue types, using HTTP GET <server>/rest/api/3/issuetype
Build a dict of all issue types (dict key is ID, since issue type name is not unique)
Get all projects, with the issue types of each:
/rest/api/3/project/search?expand=issueTypes
For each project, get its contained issue types
For each issue type, add the project to the issue type in the dict created in 1.1
Getting the results:
Iterate on the dict
if an issue type has no associated projects, it's unused
Notes:
You'll need to generate an API token to use the REST API
The above REST API endpoints return paginated data, so you will need to iterate on the results, using the total, startAt and maxResults, as explained here:
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
1 comment