Get Transition ID (Scriptrunner)

Deleted user October 18, 2017

Hi all, 

I'm just wondering if it is possible to get the current transition ID via script runner.

I would like to use this transition ID to then transition the issue back to that status at a later stage


Many thanks for your help in advance. 

Pon

1 answer

1 accepted

1 vote
Answer accepted
Daniel Yelamos [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.
October 19, 2017

Hi Pon.

Yes this is very possible.

This question would offer some guidance.

Basically it will show you how to get the transition from the transientVars. After that you can use the getId on the transition object.

Cheers!

Dyelamos

Deleted user October 22, 2017

Thank @Daniel Yelamos [Adaptavist]

 

For anyone wondering, heres the snippet i used:

 

JiraWorkflow jiraWorkflow = componentManager.workflowManager.getWorkflow(issue);

def oStep = jiraWorkflow.getLinkedStep(issue.getStatusObject());

List oActions = oStep.getActions();

and then use getId() to get the transition ID in one of the elements in the oActions array.

 

Chees, 

Pon

Like berecom likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events