I'm trying to set up functionality similar to https://jamieechlin.atlassian.net/wiki/display/JBHV/Miscellaneous+Behaviours+Examples#MiscellaneousBehavioursExamples-Addorremoveoptionstosingleormulti-selectfields but instead of a single or multi select field, I'm trying to do so with a cascading select field. The below code will populate the first dropdown of a cascading select field, but none of the values from the second dropdown show up. Does anyone have any information on how the data needs to be formatted in order to get the setFieldOptions method to work for both dropdowns in a cascading select field?
FormField functionalArea = getFieldByName("Functional Area") def ops = ["-1":"None"] ops.put("50632","508 Compliance Testing") ops.put("50620","Activity Tracking") functionalArea.setFieldOptions(ops)
I was thinking about that too. But doing this seems to not adjust the values seen on the screen at all. No errors in the log either. Then I started thinking again, wouldn't the second value in the map need to be a list of maps in order to handle multiple values in the second dropdown? I implemented the below map to setFormValues() with, and again, it doesn't appear to adjust the values either with no errors in the log. I enabled debugging and it returns a map. def ops = [:] ops.put(["-1":"None"],["-1":"None"]) ops.put(["50632":"508 Compliance Testing"],["-1":"None"]) ops.put(["50620":"Activity Tracking"],[["-1","None"],["50621":"To Do List"],["50628":"Work Activity Log"]]) /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/runvalidator.json [onresolve.jira.groovy.BehaviourManagerImpl] Returning map: [customfield_10081:[fieldOptions:[[-1:None]:[-1:None], [50632:508 Compliance Testing]:[-1:None], [50620:Activity Tracking]:[[-1, None], [50621:To Do List], [50628:Work Activity Log]]], fieldType:com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect, displayName:Functional Area]] Is there any way you could determine if cascading selects are properly supported? I'm starting to get the feeling they aren't based on my inability get it to work with all the different data types I've tried to put in here.
Alright. I think I'll just mark this as an accepted answer because functionality not implemented is what it is. I'm sure if you do implement it in the future, you will put it in the release notes for the plugin. Thanks for looking into this and thanks for making a great plugin for JIRA.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs