Forums

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

To find or view a Jira workflow and status of a particular project from the database using SQL

Rajitha Rodda October 5, 2021

Hi ,

We have a project  where  requires to display the workflows and statuses of a project.

Finding for a  sql query  to get  Jira workflow and associated status of a particular project

 

2 answers

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.
October 5, 2021

You really don't want to do this via SQL, it's messy, and you can't just "get" the workflow - you'll have to write a load of code to parse the status and transtition definitions out of the raw xml.

The REST API on server is not really going to help you much either, it only exposes bits of the workflows.

I think we should be looking to do this differently.  What problem are you trying to solve by listing the status of a workflow?  Have you tried asking people to simply look at the "view workflow" option for their current issue?

0 votes
Suvradip Paul
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.
October 5, 2021

Hi @Rajitha Rodda 

Could you please try REST API - Check this guide

https://docs.atlassian.com/software/jira/docs/api/REST/8.19.1/ ?

GET /rest/project/{projectIdOrKey}/statuses

Rajitha Rodda October 5, 2021

My jira server are with  version 8.13.9 - not possible to upgrade to 8.19.1

I am looking for a workflow name and associated status of it. 

Suvradip Paul
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.
October 5, 2021

Sorry, I forgot to ask the version in my last response, this is the version you are looking for - https://docs.atlassian.com/software/jira/docs/api/REST/8.13.9/.

Please check this one. 

Rajitha Rodda October 5, 2021

The Repose from Above API not returns the workflow details.

The expected output is -

Workflow details like name , Id

 and the statuses  inside the workflow

like -

GET - /rest/projectconfig/1/workflowscheme/{projectIdOrKey}

GET - /rest/projectconfig/1/workflow?workflowName={workflowname}&projectKey={projectIdOrKey}

           

Suggest an answer

Log in or Sign up to answer