Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Availaible transition shown in diagram is not got through API.

MURALI SARAVANAN M December 18, 2020

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"
}
}
}
]
}

 

 

Screenshot (447).png

1 answer

0 votes
Bartosz Ornatowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2020

Hi @MURALI SARAVANAN M,

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

MURALI SARAVANAN M December 23, 2020

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.

 

Bartosz Ornatowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2021

@MURALI SARAVANAN M 

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.

MURALI SARAVANAN M May 5, 2021

@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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events