How do you set Query parameters in the Jira Rest Java Client?

Glenn McDonald July 22, 2018

I'm using the Jira Rest Java Client to update the value of a custom field. I'd like the update of the issue to be silent; i.e. it should not trigger a notification.

There is a query parameter to do this (notifyUsers), however, I can't figure out how to use this parameter in jira-rest-java-client-core version 5.0.4. 

https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-issue-issueIdOrKey-put

My kotlin code is similar to the below

val issueInput = IssueInputBuilder()
issueInput.setFieldValue(jiraFieldId, newString)
jiraRestClient!!.issueClient.updateIssue(issue.id, issueInput.build()).claim()

 

2 answers

1 vote
Sotir Sotirov January 3, 2020

OK, I found working solution. Simply add '?notifyUsers=false' to the end of the URI for createWithBasicHttpAuthentication() method. Here is a short example: 

URI serverURI = URI.create("https://<YOUR_JIA_URL>/?notifyUsers=false");
this.restClient = new AsynchronousJiraRestClientFactory().createWithBasicHttpAuthentication(serverURI, "username", "password");

 

0 votes
Simon_Ullmann September 22, 2019

Did you find the solution to that problem? I'm facing the same issue...

Suggest an answer

Log in or Sign up to answer