Forums

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

Scriptrunner behaviours logic

Dirk Ronsmans
Community Champion
May 10, 2021

Hey everyone,

I'm struggling a bit to see how the logic of Scriptrunner behaviors triggers and processes the scripts.

I currently have one behavior linked to a JSM Request Type.

On this behavior I've added several fields and each field as it's own server side script.

Now I'm seeing some strange things happening and wanted to double check on whether my understanding of a behavior trigger and execution is correct.

When I change a field on my Request Type, will it always run thu all the fields I've added in that behavior and execute the script? 

Or do the fields that I add in the behavior mean that it will only trigger when that specific field is changed? I was always under the impression that a behavior will trigger when you change the field that is listed in that behavior and only for that field.

It's now that I'm seeing some weird things happening that lead me to believe otherwise.

Or maybe even clearer. It seems like when I hit my Create button to submit my request, the request is evaluated (errors on mandatory fields) and then all the behaviors seem to trigger.

I don't have any initialiser set but it almost seems like when the validation of the request is done (mandatory fields) that the form reloads and triggers all the behaviours as if all the fields I have defined are changed..?

 

Anybody got some thoughts?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events