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,
Community moderators have prevented the ability to post new answers.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.