I need to set values to a multi select field from a jira postfunction. I dont know which method/s is necessary.
Somebody help me?
Thanks!!
CustomField customField = customFieldManager.getCustomFieldObjectByName( "name_of_cf" ); IssueChangeHolder changeHolder = new DefaultIssueChangeHolder(); //Update the custom field value customField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customField), newValue),changeHolder);
I am not sure but multiselect customfield values are in the form of List so in the above code the newValue will be a List or array example :[1,3,4] will set the value of the mulitiselect list to first third and fourth values.
IIRC it will be a list of Option objects. You can get the Options from com.atlassian.jira.issue.customfields.manager.OptionsManager.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please extend the explanation of how to get the OptionsManager and set values?
Im not able to do it.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OptionsManager optionsManager = ComponentManager.getComponentInstanceOfType(OptionsManager.class)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have combined both responses and I am able to do it.
Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great, can you vote up my comments then if you found them helpful, thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you were abel to find the solution and if possible would please share it ?
I am also trying to figure out same problem. I have opened ticket here: https://answers.atlassian.com/questions/47240/how-to-set-multi-select-custom-field-value-from-a-soap-client-application
Thanks,Seema
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're asking a completely different question... SOAP vs java API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Exactly, Jamie is wright. My solution is valid if you are using Jira Java API, but you are asking for SOAP client application.
Anyway, by using
customField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customField), newValue),changeHolder);
where "new value" is a Collection of Option objects yo can set the value of the multi-select.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for responding. I have not been able to find solution for my problem yet and have not heard from any other developers too. Thanks for the info.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your question is this one: https://answers.atlassian.com/questions/48250/define-multi-level-select-cf-value-in-soapui-create-request
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.