It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

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");

 

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you