Forums

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

Get transientVars in scriptrunner behaviour

Deleted user November 2, 2018

Hello

Is it possible to retrieve the transition ID when a transition screen is shown and a behaviour would run on it? How could I do that?

I have a couple of transitions which use the same screen. Depending on the transition, I would like to set different default values for a field on that screen.

Best Regards,

Marius

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Tom Lister
Community Champion
November 3, 2018

Hi @[deleted]

you can use methods

getActionName()

or  getAction() for the ActionDescriptor from within a Scriptrunner behaviour when the screen is used by a workflow action.

This will throw an exception if the screen is used outside of a workflow so enclose in a try/catch block

Tom

Deleted user November 6, 2018

Hey Tom!

Thanks a lot!

I'm now using getAction().id == xxx and it worked perfectly.

All the best

Marius

TAGS
AUG Leaders

Atlassian Community Events