Forums

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

Transitions API - Obtain transition ID via API or hard-code?

Amir Soleimany
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 21, 2024

Hello,

I am writing a python script to transition issues through a workflow using the Transitions API. Currently in my script, I obtain my list of issues that need to be transitioned from an internal source, then I call the transitions API and pass the transition ID along with each Issue Key into a POST request to perform the desired transition.

However, currently my script has the transition ID hard-coded as I couldn't figure out a way to get the right transition using the GET transitions API. Is there a recommended practice to obtain the right transition ID?

By right transition ID - I mean I need to transition a ticket to "In Progress". I can't obtain the ID based on "In Progress" text for "In Progress" because my workflow has other statuses which have "In Progress" in their names such as "Testing In Progress" or "UAT In Progress".

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Sunny Ape
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.
August 21, 2024 edited

Hello @Amir Soleimany 

Once you know the transitionId, you can use the Get workflow transition properties endpoint to tell you that transition's key and name (value). This lets you know which one is which.

Suggest an answer

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

Atlassian Community Events