Forums

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

How do I update the label of a issue?

Viti June 24, 2019

HI!,

I'm trying to change the label of an issue with the next code:jira.png

IssueInputBuilder issueBuilder = new IssueInputBuilder(issue.getProject().getKey(), issue.getIssueType().getId(), issue.getSummary());
issueBuilder.setFieldValue("labels",Arrays.asList("label1", "label2"))
.build();

client.getIssueClient().updateIssue(issue.getKey(), issueBuilder.build());

When I updated I get a exception:

java.util.concurrent.CompletionException: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={labels=Field 'labels' cannot be set. It is not on the appropriate screen, or unknown.}, errorMessages=[]}]}

 

error_jira.png

 

How Can I change the label?

 

 

0 answers

Suggest an answer

Log in or Sign up to answer