I have a cascading-select custom list named "Team" and I want to set each of the Team list values curing a create issue. I can't seem to figure out how to set the primary list and secondary list.
Running JIRA 6.2 and using Groovy
The following code does not seem to work:
Option ctOption = optionsManager.getOptions(cfTeam.getRelevantConfig(issue)).getOptionForValue("TeamA", null); Option ctSubOption = optionsManager.getOptions(cfTeam.getRelevantConfig(issue)).getOptionForValue("SubTeam A", null); issue.setCustomFieldValue(cfTeam, [ctOption, ctSubOption])
Note, when printing debug statements, ctOption finds "Team A", but ctSubOption does not find "SubTeam A" and cfTeam does not get updated.
Thanks for any help!
Jay
are you speaking about multiselect or cascading select field?
if you are trying to set value for cascading field then check the following question
https://answers.atlassian.com/questions/234417/groovy-set-cascading-field-value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
then solution is there on other post which i gave on my answer!!
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.
Glad to hear it worked!!
i changed field name from multiselect to cascading select in your question so it will help to other users!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you must get the option that is relevant for you issue :
FieldConfig clientCustomFieldConfig = clientCustomField.getRelevantConfig(myIssue); final Options options = optionsManager.getOptions(clientCustomFieldConfig); Option coption = options.getOptionForValue("TeamA", null);
do not use issue.setCustomFieldValue but use updateValue instead
if (coption != null) { clientCustomField.updateValue(null, myIssue, new ModifiedValue(null, coption), changeHolder); }
as stated n you might want to look at https://answers.atlassian.com/questions/234417/groovy-set-cascading-field-value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.