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!
/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
@fran garcia gomera Thank you! I can get current status of the issue with
/rest/api/2/issue/{issueIdOrKey}/?fields=status
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.