Can you please help me with this validator?
We have a field "XYZ" with Yes/No/Unknown options, default value set to Unknown and to push the workflow status to In-progress we need this field's options be either Yes or No. Can you please help ASAP? Thanks!
Hi @Sravan Duddella from the Scriptrunner page
cfValues['My Multi Select']*.value.contains("Some value")
Here's a more complex example from the Scriptrunner Library
Scriptrunner Library Scripted Validator Multi-Select List
I hope this helps to get you started.
Old guy tip.
I hope you used the != to simplify complexity.
Reasoning here is the only value that is invalid is "Unknown" all other values are valid, so therefore you only need to test that the value is not equal to "Unknown".
Testing for the OR requires the system to evaluate the value twice, adding unnecessary complexity to the scripted validator which may be difficult for someone new reading it later on down the line.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event