Working with comments on issues
In this recipe, we will see how to manage commenting on issues using the JIRA API.
Let us have a look at the three major operations—creating, editing, and deleting comments. We will also have a look at how to restrict the comment visibility to a specific group of people or to a project role.
How to do it...
JIRA uses the CommentService
class to manage the comments on an issue.
Creating comments on issues
A comment can be added on to an issue in a few simple steps:
- Create
commentParams
of typeCommentService.CommentParameters
, with the appropriate values. You can do it with the help ofCommentService.CommentParameters.CommentParametersBuilder
, as shown here:CommentService.CommentParameters commentParams = ...
Get JIRA Development Cookbook - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.