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

JQL or REST API call to retrieve all possible workflow stages for an issue? Edited

Michael Gruskin I'm New Here Friday

In my Jira instance, we have a workflow field for our issues. Depending on the type of issue (Bug, Story, Spike, etc...) the steps in this workflow differ. The steps in the workflow can be seen in a graph by pressing a view workflow link in the top of the issue on the web interface. These steps are typically along the lines of:

Await work -> Do work -> Check Work -> Commit Work -> Validate and Test

Or something along those lines, depending on the issue type.

I'm not sure if this is something custom that my company pulls from a plugin, or if this is standard to Jira.

I'm trying to use JQL and the REST API to specify a project and issue type combination, and get a list of all possible steps in the workflow for that combo. The endpoint I'm currently using is:

/rest/api/2/issue/createmeta?projectKeys=myProjectKey&issuetypeNames=Bug&expand=projects.issuetypes.fields

This works for some of the fields in my issue, getting me closer to the data I need, but it leaves out others, including the workflow one that I care about.

Could anyone point me in the right direction for how I might get the data I need?

1 answer

1 accepted

Hi @Michael Gruskin,

welcome to the Atlassian community!

 

I've searched in Jira Server REST API documentation and found only:

/rest/api/2/project/{projectIdOrKey}/statuses

You can use this endpoint to get all issue types with valid status values for a project.

https://docs.atlassian.com/software/jira/docs/api/REST/8.5.1/#api/2/project-getAllStatuses

But there is no information about available transitions.

 

I was able to find only one endpoint, which could give you information about transitions, but you must provide the issue key:

/rest/api/2/issue/{issueIdOrKey}/transitions

https://docs.atlassian.com/software/jira/docs/api/REST/8.5.1/#api/2/issue-getTransitions

Michael Gruskin I'm New Here Monday

Hi Hana,

Thank you so much for your answer, I somehow missed the statuses endpoint, which was exactly what I needed! I was able to use that API response to get the data I needed. Thank you again!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

229 views 1 2
Join discussion

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