Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,101
Community Members
 
Community Events
168
Community Groups

How to Find Unused Issue Types in Jira Cloud Using REST API in Python

The algorithms is this:

  1. Get all issue types, using HTTP GET <server>/rest/api/3/issuetype
    1. Build a dict of all issue types (dict key is ID, since issue type name is not unique)
  2. Get all projects, with the issue types of each:
    1. /rest/api/3/project/search?expand=issueTypes
  3. For each project, get its contained issue types
    1. For each issue type, add the project to the issue type in the dict created in 1.1
  4. Getting the results:
    1. Iterate on the dict
    2. if an issue type has no associated projects, it's unused

Notes:

  1. You'll need to generate an API token to use the REST API
  2. 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:
    1. https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion

0 comments

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events