I have a cascading select field (Company / Location). Now I want to run a certain function based on a special Company but the condition does not evaulate to true.
cfValues['Firma / Ort'].contains(10617,10600)
Any Ideas?
Br.
Volker
Finally, I found a solution. I had to access the first part and cast to a string.
Volker
field = (String)cfValues['Firma / Ort'].get(null) return field=='company name as string'
Are those the option IDs or the values? If they are option IDs you want:
cfValues['Firma / Ort']*.optionId.containsAll([10617,10600])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I get an exception, when I try to use the optionId. javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: optionId for class: java.util.HashMap$Entry
In JQL this works: "Firma / Ort" in cascadeOption(10617, 10636)
Thanks
Volker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JIRA Version 6.1.7. Sorry, it is a cascading select field. Was to late yesterday evening.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What version of jira? Is it really a multiselect, or actually a cascading select?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great, that works. Additionally Question: what about the JQL Term
"Firma / Ort" in cascadeOption(10617)
Same cascading select field but only the first part is important?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
cfValues['CFF Name'].values()*.optionId == [10617,10600]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
def vals = cfValues['CascadingSelect'].values() vals || vals.first().optionId == 10020
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That expression is always true. If i change || to && I get an exception.
javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: java.util.HashMap$Values.first() is applicable for argument types: () values: []
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, any further comments to this Problem ? This does not work...
def
vals = cfValues[
'CascadingSelect'
].values()
vals || vals.first().optionId ==
10020
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yeah should have been &&
what's the exception?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, as stated above: the exception is
javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: java.util.HashMap$Values.first() is applicable for argument types: () values: [] Possible solutions: print(java.io.PrintWriter), print(java.lang.Object), sort(), find(), find(), find(groovy.lang.Closure)
I looks like the ".first()" is not available.
Br
Volker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.