Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Dmitrii I'm New Here Nov 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

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

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you