query for ALL statuses in a workflow

Michael Bulger November 25, 2014

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

1 vote
Answer accepted
Norman Abramovitz
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 26, 2014

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.

https://confluence.atlassian.com/display/JIRA063/Using+XML+to+create+a+workflow

https://confluence.atlassian.com/display/JIRA063/Sharing+your+workflow

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'

Norman Abramovitz
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 26, 2014

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.

Norman Abramovitz
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 26, 2014

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

0 votes
Peter Bengov
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 25, 2014

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

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 25, 2014

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

Suggest an answer

Log in or Sign up to answer