I have 3 Select List (single choice) custom fields. I want to set the available options of the fields in 2 & 3 depending on the selection of field 1. To test this, in the Initialize script of the behaviour I am able to set debug messages on the field 2 and 3 using setHelpText, but when I use setFieldOptions, the available options do not change. Any ideas?
// Define custom field IDs
String level1FieldId = "customfield_16728"
String level2FieldId = "customfield_16729"
String level3FieldId = "customfield_16730"
// Retrieve the fields by their IDs
def level1Field = getFieldById(level1FieldId)
def level2Field = getFieldById(level2FieldId)
def level3Field = getFieldById(level3FieldId)
level2Field.setHelpText("Initialize Level2Field")
level3Field.setHelpText("Initialize Level3Field")
level2Field.setFieldOptions([ [value: "Test Field 2", description: "Test Option 1"]
])
level3Field.setFieldOptions([
[value: "Test Filed 3", description: "Test Option 1"]
])