Hello,
I'm using Jira 4.4 and Behaviours-jira-0.5.0
I try to modify a select field according to another select field value, like the example with component and subcomponent (here).
I make that :
FormField f01 = getFieldById(fieldChanged) FormField f02 = getFieldById("customfield_10902") Map fieldOptions = [:] fieldOptions.putAll([10030:"Lemons", 10031:"Oranges"]) f02.setFieldOptions(fieldOptions)
The mapping is OK. But the second field stay empty and I have no errors in log file :
/secure/admin/EditValidator.jspa [onresolve.jira.groovy.ViewBehaviours] updateValidator /secure/admin/EditValidator.jspa [onresolve.jira.groovy.ViewBehaviours] Clear GroovyClassLoader class cache. /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/runvalidator.json [onresolve.jira.groovy.BehaviourManagerImpl] Returning map: [customfield_10902:[fieldOptions:[10030:Lemons, 10031:Oranges], fieldType:com.atlassian.jira.plugin.system.customfieldtypes:select, displayName:f02]]
I don't understand why.. Just another question, where can I find documentation about com.onresolve.jira.groovy.user.??? like Formfield
Thank you.
[10030:"Lemons", 10031:"Oranges"] need to be valid options (IDs and names) for the select list.
All that setFieldOptions can do is effectively remove options, not add ones that don't exist.
> Just another question, where can I find documentation about com.onresolve.jira.groovy.user.??? like Formfield
The important stuff is inline under the script editor, but the rest is in the source code :-(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.