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

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

monica I'm New Here Oct 09, 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

0 votes
Answer accepted
/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 I'm New Here Oct 10, 2019

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

/rest/api/2/issue/{issueIdOrKey}/?fields=status
Like fran garcia gomera likes this

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 ...

303 views 1 3
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