Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get id of comment after create via jrjc?

Dang Thi Thuy Tien
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2019

Hi, 

I use the jrjc (jira rest java client) to add new comment in the client server.

public void addComment(String issueKey, String comment) {
IssueRestClient issueClient = restClient.getIssueClient();
try {
Issue issue = issueClient.getIssue(issueKey).claim();
URI issueURI = new URI(issue.getSelf().toString() + "/comment/");
Comment jiraComment = Comment.valueOf(comment);
issueClient.addComment(issueURI, jiraComment).claim();
} catch (URISyntaxException e) {
log.error("URI exception: ", e);
}
}

 Something like this.

But right now I want to get the id of comment after add. How can I do it?

 

Many thanks,

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Thomas Deiler
Community Champion
July 15, 2019

The question was meanwhile opened at https://community.developer.atlassian.com/.

Follow this link.

TAGS
AUG Leaders

Atlassian Community Events