I am trying to execute a simple behaviour using Adaptavist ScriptRunner. On a workflow transition screen, I have 2 fields:
- customfield_10907 is a select list (single) field
- customfield_28501 is a radio button field
If the user selects "Training" in customfield_10907, then customfield_28501 should appear.
If the user selects any other value, then customfield_28501 should be hidden.
Here is my server-side script:
def CategoryField = getFieldById("customfield_10907")
def moreTrainingField = getFieldById("customfield_28501")
if (CategoryField.getValue() == "Training") {
moreTrainingField.setHidden(false)
} else {
moreTrainingField.setHidden(true)
}
The behaviour is not not working. customfield_28501 appears on the transition screen regardless of the selection in customfield_10907
Any suggestions on how to fix this so it will work?