Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Dmitrii November 11, 2020 edited

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-
Rising Star
Rising Star
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.
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
atlassian, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events