We are trying to hide custom fields based on one of our custom fields value (team), and also hide custom fields based on the workflow status and transition.
We are using Adaptavist scriptrunner and can do this in two separate behaviours:
1. Hide certain custom fields based on a custom fields value (so each team only see their own custom fields - some fields are shared)
2. Hide certain custom fields except when they are in certain workflow statuses or transitions.
If we did one of the above behaviours then the behaviour works correctly. However, if we add both behaviours then only Behaviour 1 works. The custom fields are hidden based on a custom fields value, but the custom fields still appear in all statuses/transitions.
Is there anyway to have both of these behaviours working together, possibly using groovy scripting in a single behaviour?