Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Validate that both dropdowns of a cascading select are filled , has an error

wen zhu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2020

My application environment:
Scripts runner: 5.9.0
jira Software: 8.7.1
Multi-Level Cascading Select: 6.0.12
My question is: I am using Cascading Select, I hope the second field is also Require,not none

Follow the official prompt: https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/validators/simple-scripted-validators.html#_validating_cascading_selects

When I test, I get an error:

jira-select.png

 

 

 

1 answer

0 votes
wen zhu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2020

The Error message:

Time (on server): Sat Apr 25 2020 17:47:02 GMT+0800 (中国标准时间)

The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.

2020-04-25 17:47:02,129 ERROR [utils.ConditionUtils]: *************************************************************************************
2020-04-25 17:47:02,130 ERROR [utils.ConditionUtils]: Condition failed , built-in script:com.onresolve.scriptrunner.canned.jira.workflow.validators.SimpleScriptedValidator
groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.keySet() is applicable for argument types: () values: []
Possible solutions: toSet(), toSet(), set(int, java.lang.Object), set(int, java.lang.Object), get(int), get(int)
 at Script111.run(Script111.groovy:1)
2020-04-25 17:47:02,134 ERROR [utils.ConditionUtils]: Script follows:
cfValues["所属业务"]?.keySet()?.size() == 2

Suggest an answer

Log in or Sign up to answer