Hello, I'm trying behaviours to create some custom fields changing their values / hidden property based on each other values and I'm stuck with some problems.
One of those problems is that my server side scripts are not triggered when the form first loads, for example I created a checkbox field with an options and I put
def summ = getFieldById('summary')
summ.setFormValue("I'm ok!")
as a server-side script attached to the field;
documentation says about the server side scripts
Our server-side script, when written, will be called the first time this field appears, and any time the user changes it in the dialog.
But when the form first load (Create button) that code does not triggers, while it does (correctly) when I check/uncheck the option on the chechbox.
Am I missing something or doing something wrong? How can I implement correctly that requirement?
Hi,
You should add this script to the Initialiser of the behaviour, so that it is triggered when the form is first loaded.
Antoine
Yes sorry I had not been clear enough, I was referring to the part in the behaviours documentation where it says about the server side scripts
Our server-side script, when written, will be called the first time this field appears, and any time the user changes it in the dialog.
I can' t well understand what that "the first time this field appears" thing means.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This means the script will be called if the field is on the form. It will be called again each time the value is updated (i.e. if you check/uncheck a box).
I believe the behaviours should be triggered when the create issue form loads (it works that way on my jira). Have you set a condition ? Could you provide a screenshot of your behaviours configuration ?
Thanks !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.