I am using behaviours plugin to add behaviour to 2 fields consider A and B .
A is a multiple select version picker customfield and B is a single select version picker customfield.
I have modified this script to add options to A and B based on each other .
when options in A are selected option in B are automatically prepopulated
However even before i select the a option in A , the behaviour occurs and i see only "None" as the option while B is a verion picker i should be able to see the versions of the project.
Similary while i select B i am trying to prepopulate value in A but that is not happening because i cant see any option in B other than "None"
And even after i remove the option from A i am able to see the corresponding values in B , It should get removed when option is removed.
How to tackle this ?
is there something i am missing ?
Community moderators have prevented the ability to post new answers.
I figured it out . i added a return statement in my code if no value is selected
FormField formComponent = getFieldById(fieldChanged)
FormField formSubcomponent = getFieldByName("B")
Object componentFormValue = formComponent.getFormValue()
How to set an option to a multi select version picker ? in the logs i see the values are perfect but the field disappeaars when i select a value from other field
i use below for setting values for single select and multiselect version picker . for single select its working fine .
Map fieldOptions = [:]
i found that the format in which a single version picker values and multi version picker values are saved is different. a single version requires
to set the value.
while, a mulitiversion picker requires only the version id
Now only have to remove values from dependant fields when options in a multi version picker are cleared.
When i set value to a multiselect version picke using setFormValue() it sets the value perfectly but when i try to set the options of the multiselect version picker using setFieldOptions() the field disappears however when i view the source of the page from the browser i see the options in the field. why the field is not visible ?
Take our 5-minute survey to win a $500 Visa gift card! Are you currently using Confluence Cloud? We want to hear from you! Fill out this quick survey about your Confluence Cloud experience so we ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events