Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

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.

4 answers

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.

Like # people like this

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

Open your workflows in text you can find the transition id's.

@Nic Brough _Adaptavist_ Thanks for the info, exactly what I was looking for.

This didn't work. Apparently the transition IDs are not available.  Here's the workflow image from my jira instance in text . IDs are not shown on the image.JiraProjectWorkflow.JPG

@Benjamin Paz You are in view mode of the workflow. If you want to see transition id you must edit the workflow in text mode. Then you will see Transition (id) field.Capture.JPG

 

  

Like # people like this
3 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!

Use API to list transitions for an issue.

Post the following into browser

https://jira.domain.tld/rest/api/2/issue/<issuekey>/transitions

Yes, you need to give it the key of the issue you want to work with.

curl -u user:password -X GET http://jiraURL/rest/api/issue/issuekey/transitions?expand=transitions.fields

that should return available transition states for that issue based on its workflow

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across Jira Cloud instance.   📢 Get y...

237 views 11 9
Read article

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