How can I check current JIRA story transition through rest API?

monica October 9, 2019

I am trying to setup a task to monitor list of jira stories, check if the transition story changed to <some transtion> with rest api. something like polling for every minute to check if JIRA ticket has been approved or not.
I can get available transitions for a story which can change to 
rest/api/2/issue/<issue_id>/transitions but I am looking for current status transition Id. How I can get it?
any help would be appreciated.Thanks!

1 answer

1 accepted

1 vote
Answer accepted
fran garcia gomera
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 10, 2019
/rest/api/2/issue/{issueIdOrKey}/?fields=status

gives you the info about the current status for an issue.

The response looks like this

{
"expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
"id":"99769",
"self":"https://yourjira.com/rest/api/latest/issue/99769",
"key":"PT-1939",
"fields":{
"status":{
"self":"https://yourjira.com/rest/api/2/status/5",
"description":"A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.",
"iconUrl":"https://yourjira.com/images/icons/statuses/resolved.png",
"name":"Pruebas Integración",
"id":"5",
"statusCategory":{
"self":"https://yourjira.com/rest/api/2/statuscategory/3",
"id":3,
"key":"done",
"colorName":"green",
"name":"Listo"
}
}
}
}

Don't know if this is what you were looking for

monica October 10, 2019

@fran garcia gomera Thank you! I can get current status of the issue with 

/rest/api/2/issue/{issueIdOrKey}/?fields=status
Like # people like this

Suggest an answer

Log in or Sign up to answer