The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set "Labels" field value?

Thainnara_Santos
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 17, 2020

I'm trying to create a new ticket with the field "Label" filled with some labels, like this:

 

I have an array of labels to the "Label" field:

String[ ] labels = new String[ ] {"ABC","135"};

and I'm trying to fill the "labels" field with this array, like this: 

IssueInputBuilder inputBuilder = new IssueInputBuilder(projectKey, issueType, issueSummary);

inputBuilder.setFieldValue("labels", labels);

 

But I'm having an error:

Exception in thread "JavaFX Application Thread" com.atlassian.jira.rest.client.api.domain.input.CannotTransformValueException: Any of available transformers was able to transform given value. Value is: [Ljava.lang.String;: [Ljava.lang.String;@3b6b1644

 

How can I do this?

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.