Hi community.
Please help me to select approach to creating Behaviours.
I need to filter possible values in field Priority. The field is custom.
It depends on Issue type, Customer (customfield), Product (customfield).
I'm looking at option to create one Behaviour which will have a script for each of this three fields. What are your thoughts?
Or maybe anyone has suggestions that can save me some time?
Cheers
Seems like you would need the same script on all 3 fields so that changing each field triggers a recalculation of your priority.
The best way to achieve that would be to store a script in your script root and point to the script from each server-side script for each field in the behavior. This way, you only have 1 piece of code to maintain.
Hi Peter,
You are right that 1 piece of code is much better than several.
What do you mean by ' script root '? I am using behaviour. So the script should be located in Behaviour Settings in Initializer part?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See this reference:
https://scriptrunner.adaptavist.com/latest/jira/#_script_roots
Then in behavior, this section will be relevant:
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html#_live_editing
This new feature (I haven't used it yet) may also help you.
https://scriptrunner.adaptavist.com/latest/jira/script-editor.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Or may be It is better to have 3 bihaviours, like one behavior for one field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.