I have a custom field, of type cascading select list, with these values (first -> second):
customer_A - Location1 (one choice)
customer_B - Location2 (two choices)
- Location3
etc.
However, when I select Customer_A in the first drop-down, the second drop-down has None and Location1.
Similarly, choosing Customer_B, I get 3 choices: None, Location2, Location3.
I tried to add a validator on a transaction, using a Simple Scripted Validator from the ScriptRunner add-on.
I tried the following 3 methods (as suggested in various posts), but none works:
cfValues['customfield_17637']?.values()[1].value != Null
cfValues.get('customfield_17637')?.keySet()?.size() == 2 // values are returned as map
cfValues['customfield_17637']?.values()*.value.size() == 2
A co-worker suggested to add an actual value of None and check against it, but I hate this because the user will see 2 None values.
Any idea?