jira - how to validate a multi select list with simple scripted validator for a default value? -
I have a scenario:
There are two fields, a 'text field' and the other one There are 'Multi-Selection List', these two fields appear only during an infection.
Multiple selection list fields are always mandatory and text fields must be made mandatory based on the selected value in the list. In addition, there is a "none" value in the multi selection list that is by default in cumin.
I have written two scripted verifiers for them:
(cfValues ["Test multi"] .value.contains ("value 1") cfValues ["test multi"] .value.contains ("value 2") & amp; amp; ; And cfValues ['Text Field']) - LHS
|| -
(cfValues ["test multi"]] Basically, the above defines: If value 1 and value 2 are selected from the list and 'text field' is empty then show error for the requirement of this field. If 'value 3' is selected then 'text field' is not mandatory but Here's the problem, LHS || RHS never works properly, though they do the right thing right. I have tried all the combinations now, like CF values ["test multi"]! = Nulls and CIFVs ["Test Multi"]. value! = Faucet etc. Anything starts to work, am I doing something trivial? Please suggest. Thanks, Hemant
Does not work properly? The conditions have been written correctly, so when you have Test multi code no one or the value of "value 3" should be continued without the text field . I can see that the only problem is that whenever your values are for "value 1" and "value 3", then your text field is not mandatory. Can:
! (CfValues ["Test Multi"]. Value.contains ("value1") || cfValues ["test multi"]. Value ("value 2")) If that is not a problem, please specify what is wrong.
Comments
Post a Comment