How to get and set multi select values of any custom field in jira by using JAVA Code

By “field id” or “field name” how can we get all the selected options from multi select custom field?
also I want to set multiple values to the multi select type “custom field” by using java code.

The Issue object has a getCustomFieldValue method. This method accepts an instance of a CustomField and returns an Object which should be cast to the appropriate Datatype for that CustomFieldType. That is what I would use.

CustomField myMultiSelectField = customFieldManager.getCustomFieldObject(10010L);
List<Option> values = (List<Option>) issue.getCustomFieldValue(myMultiSelectField);
1 Like

Thanks for your valuable inputs. I have updated the question can you please help me in that?

Can you clarify your post? I am confused.

I want to set values for custom field which is type of “Select List (Multiple Choices)” by java code.

HI Nilesh,

Please check the below link once.

https://developer.atlassian.com/server/jira/platform/performing-issue-operations/