Forums

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

How to execute logic in the transition screen?

Artemy Matvienko
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 15, 2019

I'd like to do something like what's mentioned in this ScriptRunner example. However, I want to do this in a transition screen. I've tried the code in the example, but it doesn't seem to work in transition screens. I'm assuming that behaviours can't execute groovy code on a form, which is what a transition screen likely behaves like, if there was no significant event, such as changing a value before submitting. That's what JavaScript is for. How would I go about using ScriptRunner or JavaScript to replicate that example in a transition screen?

1 answer

1 accepted

1 vote
Answer accepted
Artemy Matvienko
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 17, 2019

The solution is to use "add a field" in the behaviour, and place the logic in the validator script. This script will execute whenever the field value changes, even if the value isn't saved, so just like a change event in javascript.

Suggest an answer

Log in or Sign up to answer