Class CommentResource

java.lang.Object
com.atlassian.jira.rest.v2.issue.CommentResource

public class CommentResource extends Object
Since:
4.2
  • Constructor Details

  • Method Details

    • getComments

      public javax.ws.rs.core.Response getComments(String issueIdOrKey, String expand, PageRequest pageRequest, io.atlassian.fugue.Option<OrderByRequest<CommentResource.CommentField>> orderByRequest)
      Returns all comments for an issue.
      Parameters:
      issueIdOrKey - to get comments for
      expand - optional flags: renderedBody (provides body rendered in HTML), properties (provides comment properties).
      Returns:
      all comments for the issue
    • getComment

      public javax.ws.rs.core.Response getComment(String issueIdOrKey, String commentId, String expand)
      Returns a single issue comment.
      Parameters:
      commentId - the ID of the comment to request
      issueIdOrKey - of the issue the comment belongs to
      expand - optional flags: renderedBody (provides body rendered in HTML), properties (provides comment properties).
      Returns:
      a Response containing a CommentJsonBean
    • updateComment

      public javax.ws.rs.core.Response updateComment(String issueIdOrKey, String commentId, String expand, CommentJsonBean request)
      Updates an existing comment using its JSON representation.
      Parameters:
      issueIdOrKey - a string containing the issue id or key the comment belongs to
      commentId - id of the comment to be updated
      expand - optional flags: renderedBody (provides body rendered in HTML), properties (provides comment properties).
      request - json body of request converted to a CommentJsonBean
      Returns:
      updated Comment
    • deleteComment

      public javax.ws.rs.core.Response deleteComment(String issueIdOrKey, String commentId)
      Deletes an existing comment .
      Parameters:
      issueIdOrKey - a string containing the issue id or key the comment belongs to
      commentId - id of the comment to be deleted
      Returns:
      No Content Response
    • setPinComment

      public javax.ws.rs.core.Response setPinComment(String issueIdOrKey, String commentId, boolean pinned)
    • getPinnedComments

      public javax.ws.rs.core.Response getPinnedComments(String issueIdOrKey)
      Returns list of pinned to issue comments.
      Parameters:
      issueIdOrKey - of the issue the comment belongs to
      Returns:
      all pinned to the issue comments
    • addComment

      public javax.ws.rs.core.Response addComment(String issueIdOrKey, String expand, CommentJsonBean request)
      Adds a new comment to an issue.
      Parameters:
      issueIdOrKey - a string containing the issue id or key the comment will be added to
      expand - optional flags: renderedBody (provides body rendered in HTML), properties (provides comment properties).
      request - json body of request converted to a CommentJsonBean
      Returns:
      the added comment