Hi folks,
I have three request types in a JSM project, let's say:
- RT1
- RT2
- RT3
I also have a custom field, single select choice type with 6 options (OPT1, OPT2 etc OPT6).
I'm trying to create a Scriptrunner ->Behaviour script on this custom field so that if someone tries to create a ticket in the portal and they choose the Request Type RT1 to display only options OPT1 and OPT2 for example in the custom field. If they select RT2 to display only OPT3 and OPT4 etc.
Can someone help me with such a script example?
I tried with this thing:
def field = getFieldByName('MyCustomFieldname')
field.setFieldOptions(['OPT1', 'OPT2', 'OPT3'])Works but for a single request type - how can i add more?
Thanks