Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API - Update Issue Status without knowing Trans Id

Chiara Spadavecchia
Contributor
January 28, 2021

Hi,

the external system knows the target status but not the Transition Id. For example, the external system knows that the Issue status of FWT-1 must become “Closed”. For the external system the goal is to update the issue status without knowing the transition ID. What REST API calls should the external system perform?

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
January 28, 2021

You should use the REST API calls that ask what transitions are availble, the metadata call should include that.

Chiara Spadavecchia
Contributor
January 29, 2021

Thanks, I know BUT how It is possible to Get the Transition ID starting by the Target Status?

The external system would like to get the Transition ID directly and NOT all possible transitions. The external system cannot insert logic to process the response with all possible transitions. Is there a way to do It? A REST API Call that returns the transition ID querying by target status.

Thank you

Nic Brough -Adaptavist-
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.
January 29, 2021

You are asking the question in the wrong place.

You can ask Jira to give you a list of available transitions for the current issue, or with a bit more processing, you could read the workflow and parse that for the list of transitions out of a status.

But Jira can't tell you which transition to run. It can't know - you need to tell it.

You need to decide which one it is (then you can pull the id out of the list of available ones given by the metadata call)

Chiara Spadavecchia
Contributor
January 29, 2021

ok, when you say "you could read the workflow and parse that for the list of transitions out of a status" what do you mean? What is the REST API call?

Thanks

Nic Brough -Adaptavist-
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.
January 29, 2021

That means reading all the workflows, identifying which one you are using and parsing the xml to find the id of the transition.  api/latest/workflow is the REST endpoint for working with workflow

Chiara Spadavecchia
Contributor
February 2, 2021

Ok, Is it possible to print also the added property into the response of get-transitions?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events