How to get all statuses for one project type with SQL?

Dmitrii November 11, 2020

I know that there is a REST endpoint /rest/api/2/project/{prject_key}/statuses which will return statuses for a project, in objects for a particular type. Knowing the project id and issue type id, need to get a list of statuses related to the issue type with SQL.

How to do it?

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 11, 2020

SQL is a last restort, the worst possible way to get information out of a Jira database.  You really should avoid doing it this way.

However, if you insist, you'll need to

  • Read Project to find the project ID
  • Read nodeassociation to get the workflow scheme for the project
  • Read workflowscheme to get the workflows associated with the project
  • Read each workflow out of jiraworkflows
    • Parse the xml you get for the step to status mappings
      • Read issuestatus to get the status name

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events