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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Open your workflows in text you can find the transition id's.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- Thanks for the info, exactly what I was looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough _Adaptavist_ Thanks for the info
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use API to list transitions for an issue.
Post the following into browser
https://jira.domain.tld/rest/api/2/issue/<issuekey>/transitions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
issuekey?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you need to give it the key of the issue you want to work with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.