I have a custom field from type Select List.
I would like to make a different custom field required when this select list field's value is equal one of 3 options (the select list contains 7 options total).
I'm trying to set this rule via Workflow validator with the use of Script Runner. If I would have liked to be based on just one of the values in the select list, I could have used this with no problem:
cfValues['selectListCF']*.value.contains('ticketCanBeCreated') || cfValues['selectListCF']*.value.contains('oneOfTheOptionsThatRequiresMandatoryValueInOtherCF') && cfValues['cfIWantToMakeMandatory']!=null
Is there an option to choose more than one value of a select list using Script Runner?
You could do as Marten said but easier would be:
Don't know use *.value unless it's a multiselect.
Without knowing to much about Script Runner, I would recommend an easy work-around by creating two workflow validators (one for each value). You should be able to link them together with the help of jiras workflow editor to create a similar "OR" logic.
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG