The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Behaviour using multiple fields should filter one field

Oleksii Filiaiev
October 30, 2019

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

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
PD Sheehan
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 Champions.
October 31, 2019

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.

Oleksii Filiaiev
November 1, 2019

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?

PD Sheehan
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 Champions.
November 1, 2019
0 votes
Oleksii Filiaiev
October 31, 2019

Or may be It is better to have 3 bihaviours, like one behavior for one field.

TAGS
AUG Leaders

Atlassian Community Events