Hi Community,
I'm currently trying to setup a Scriptrunner Behaviours to achieve the following:
The field "Classification" should only appear on the screen if the value of the Fix Version/s field has a specific version (example "Version_1").
I found the article Behaviours Activities (adaptavist.com), which works fine when using only custom fields (like Select List (single choice)).
However, for system fields like Fix Version/s it does not work.
My current code looks like the below:
def classification = getFieldByName('Classification')
def fixVersions = getFieldById(getFieldChanged())
def selectedOption = fixVersions.getValue() as String
def isFixVersionSelected = selectedOption == "Version_1"
classification.setHidden(!isFixVersionSelected)
classification.setRequired(isFixVersionSelected)
I suspect that since the System field "Fix Version/s" could contain multiple values, that I need to tweak it somehow (but I'm not sure how).
Can anyone gove me a hint on how to achieve this?
Kind Regards,
Stephan