I have multiple Behaviours in a jira form. The behaviour(s) each hide/show a text field based on a radio button choice.
I understand the behaviours are triggered by a condition being met...in my case, if the radio button value is "Yes", show the text field associated with it.
Here are my questions:
1. Will every behaviour with a field on my form trigger (be evaluated) each time I change a value in any of the fields I have behaviours for? And if so, is this a drag on performance?
2. When looking at performance, Is it better to create multiple individual behaviours, one for each field, or a single behaviour which contains all actions needed for each field
Ultimately I am trying to understand the scope of a behaviour, and whether one or many are evaluated at a time.
Thank You in advance
Hi Luke,
So, Behaviours will run whenever the field that they are on is changed. So if you want to show/hide a text field based on a Radio Button choice, the Behaviour should go on the Radio Button. This way, the Behaviour will run each time the Radio Button field is updated.
They also only run on the screens where the issue is editable, so they would run on screens like the Create and Edit screens, to name a few. This means that if you Create the issue with your text field hidden, it will still show on the View issue screen if it is filled in. Now, say you don't want this field to be editable on the View screen. You can put an empty Behaviour on it to trigger the popup edit form (as opposed to using the inline edit) and then you are back on the Edit screen, which means your Behaviours will run and the field will be successfully hidden again.
The performance would depend on your specific instance and exactly what kind of and how many Behaviours you need to implement. I haven't seen any difference in performance between using one large Behaviour and using many small Behaviours.
Something to note is that if you have multiple Behaviours that rely on one field, they should all go in one Behaviour. There is no guarantee in execution order for Behaviours, so if multiple depend on one field, things could get messed up. There shouldn't be any issues with using one large Behaviour for a given context. That being said, you also shouldn't create one giant Behaviour that has a bunch of IF/ELSE checks for project and issue types.
Carmen
Carmen, Thank You for your time. I chose the method you described, which is to create and associate behaviours with specific fields
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.