Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 to update a field in issue with Jira rest java client?

I try to update priority for an issue. I use jrjc version 5.1.0

IssueRestClient issueClient = restClient.getIssueClient();
IssueInput issueInput= ....
issueClient.updateIssue(issueKey,issueInput);

I find the function with have 2 param issueKey and issue.

But I just want to update one field. How can I do that?

Thank you,

 

1 answer

1 accepted

0 votes
Answer accepted
IssueRestClient issueClient = restClient.getIssueClient();

IssueInputBuilder builder = new IssueInputBuilder();
builder.setPriorityId(priorityChangeId);

IssueInput issueInput= builder.build()
issueClient.updateIssue(issueKey,issueInput);

Just do like this ;)  

Adir D I'm New Here Oct 29, 2020

@Dang Thi Thuy Tien 

Thanks for your help.

this code uses old code of the API ?

seems there is not existing empty constructor of IssueInputBuilder()
also no such existing method ' updateIssue'

issueClient.updateIssue(issueKey,issueInput);

will be helpful to get reference to some example project from latest version (or close...)

 

Thanks

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