Is there is a list of all available transition IDs

I would like to use the JIRA API to progress the job status.  I cannot find a definitive list of all transition IDs.  I understand a request using e.g. /rest/api/2/issue/MY-REF-ID/transitions will return the available transition for that job, but what I am after is a complete list of all possible transition IDs.  Many thanks.

2 answers

2 votes

There isn't one.  The question is quite difficult, because "a list of all transition ids" could easily look like 10010, 10020, 10020, 10020, 10020, 10022, 10024, 10030, 10034, 10035, 10035, 10035 and so-on.  They are only unique within the workflow, AND they can be shared. 

Fetching a transition without the context of the issue and that issue's status is pretty much useless - you can't actually do anything useful with it.

Thank you for your quick response. 

It sounds like I first need to find out what transitions are possible, and then select the correct id from those available.

In my case, I need to progress a ticket to "Awaiting Test" (assuming that is an option).  Do I need to search the response for "name" : "Awaiting Test", and extract the id value relating to it?

That's correct, yes. 

You can't trigger transitions that are not valid for the issue, so the list isn't a lot of use, and it's best to ask the system what is valid, and parse it for the one you're looking for!

You can see a list of all of the transition IDs and other details about the status if you go to:

http://your-site-here/rest/api/latest/status/

The ID that you're looking for is the one in the main section and not the one in the StatusCategory section. You'll see a list of all of the statuses that are available on your instance of Jira.

Example output:

{

}

That's not the transition id, it's the status id.

Hi @Nicany idea where to find the transition id?

Over REST, the response to a "get issue" can include all available transitions for that issue, including ID and name

See https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue-getIssue

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

69 views 0 4
Read article

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