query for ALL statuses in a workflow

Attempting to create a sql query that returns EVERY status in a given workflow. For example, given a workflow_id of "10000", I need to retrieve every status in the workflow.

3 answers

1 accepted

Workflows are stored as xml blobs.   If your database support XML access you might be able to do it through the database.   Otherwise you need export the data and use your favorite script language xml parser.



You can export the workflow as xml.  Follow the directions for exporting the workflow in the sharing your workflow doc and choose 'as xml' instead of 'as workflow'

If you really are looking for every status you can search for jira.status.id attirubute then then use the parent step node to get the name attribute.

If this is a one time thing, then just use your favorite text editor. It will be quicker.

0 vote

Workflows are not stored in a format that will let you extract it with plain SQL.

As Nic noted, this can't be done via given JQL function. Tell us more about what you are aiming for and what do you want to understand from the data. Maybe someone could help with a workaround

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

147 views 1 17
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you