ferdy
ferdy

Reputation: 7716

Updating issues using Jira Rest Java Client (JRJC) in groovy/java

I need to manipulate fields issues based on either fixVersion or label and set new values there. I found that JRJC 3.0.0 is at least useful to get issues based on it's keys, read out the labels and other fields and so on.

It looks like this:

def jirakey = 'FOOBAR-123'
def issue = this.restClient.getIssueClient().getIssue(jiraKey).claim()

While you can do stuff like voting for the issue, set new transitions or even create new issues, I did not find any method to update the fields, say fixVersion or labels.

There's an issue at the atlassian folks jira, saying, that this issue has been solved but I can't follow it, because there's no functionality updating issues and within the comments there's even code fragments showing how to circumvent the missing feature.

Additionally I found a more recent question "Is there up-to-date documentation on using JRJC in a JIRA plugin?" where the answer was enlightening: "Throw away jira-rest-java-client-api and do direct calls to JIRA REST API."

Is there any suggestion to use the library nevertheless and how would you implement the missing feature?

Upvotes: 1

Views: 1412

Answers (1)

ferdy
ferdy

Reputation: 7716

Unfortunately, I didn't looked it up thourougly enough. So the answer to my question is to use the method IssueRestClient.updateIssue() which is available since JRJC-3.0.0.

Upvotes: 2

Related Questions