Product : Jira server data centre
Project type : Basic
Issue type : Service Request With Approvals
Current Issue Status : Waiting For Approvals
Question : For the Above issue type there are three possible transitions shown in Workflow Diagram, but when got through API, only one transition is returned as response...Have attached the photo of diagram and API request with diagram
API : <base url>/rest/api/2/issue/IT-10/transitions
Response :
{
"expand":"transitions",
"transitions":[
{
"id":"921",
"name":"Cancel request",
"to":{
"self":"http://<base-url>/rest/api/2/status/10004",
"description":"This was auto-generated by Jira Service Desk during workflow import",
"iconUrl":"http://<base-url>/images/icons/status_generic.gif",
"name":"Canceled",
"id":"10004",
"statusCategory":{
"self":"http://<base-url>/rest/api/2/statuscategory/3",
"id":3,
"key":"done",
"colorName":"green",
"name":"Done"
}
}
}
]
}
Thanks so much for your question.
The transition that is missing is connected to Approvals. I believe Jira Service Management does not consider Approvals to be transitions, and as such it does not display them, as there is some custom logic involved in there that makes them “not-triggerable” by regular users, but rather happen automatically once enough approvers click on the approve button (or either declines it).
Perhaps you can tell us what do you need that transition information for, and we can figure something out.
Thank you,
Bart
Jira Service Management
ps. if this answer is correct, please select the ‘accept answer’ button
Hello @Bartosz Ornatowski ,
1. The Account i'm using is the administrator account and i have only Cancel button(which is the one got through API too for transition) and other two buttons are not shown.
2.We are using this transition to change the status as we are integrate Jira with our product.
3.Then the use case is , we will choose the transition we require for the issue after it is created. So if i choose the Available transition from "Waiting For Approvals", only if cancel is chosen , status is changing else status is not changing, as other transitions are not got through API after issue created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure if I understand your requirements correctly. Approvals are not really transitions, as they may require for example 5 people to approve the ticket, and the transition will happen only after the 5th person approves. And these will be very specific users as well, potentially different for each ticket.
So if you would like to integrate your product to make automatic transitions, it will most likely not be able to make those when there are pending approvals involved.
Perhaps using the following endpoint will let you discover those scenarios:
https://docs.atlassian.com/jira-servicedesk/REST/4.13.2/#servicedeskapi/request/{issueIdOrKey}/approval-getApprovals
Bear in mind that Approvals can be added to any status and any transition, and there can be more than one status changes requiring approvals for any Service Desk issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bartosz Ornatowski Hi you are telling that if all the approvers approved then when api is called , it will return all the transition available for the issue ryt?
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.