Hi All,
I have a scenario:
-> There are two fields, one is a 'Text field' and another is a 'Multi select list', these two fields appear only during a transition.
-> Multi select list field is always mandatory and the text field should be made mandatory based on the value in selected in the list. Also, the multi select list has a value "None" which is by default in the Jira
-> I have written two scripted validator for these:
((cfValues["Test multi"]*.value.contains("Value 1") || cfValues["Test multi"]*.value.contains("Value 2")) && cfValues['Text field']) — LHS
|| ---- OR
(!cfValues["Test multi"] || cfValues["Test multi"]*.value.contains("Value 3")) ---- RHS
Basically, the above defines: If value 1 and value 2 from the list are chosen and the 'Text field' is empty then show error that this field is required. If Value 3 is chosen then the 'Text field' is not mandatory.
But the problem here is, '!cfValues["Test multi"]' condition doesnt seem to work at all.
I have tried all the combination now viz cfValues["Test multi"] != null and cfValues["Test multi"]?.value != null etc. Nothing seem to work, Am I doing anything trivial? Please suggest.
Thanks,
Hemanth