简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM