Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,361,493
Community Members
 
Community Events
168
Community Groups

Get transientVars in scriptrunner behaviour

Deleted user Nov 02, 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

0 votes
Answer accepted
Tom Lister Community Leader Nov 03, 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 Nov 06, 2018

Hey Tom!

Thanks a lot!

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

All the best

Marius

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

208 views 1 6
Read article

Atlassian Community Events