api/src/main/java/com/epam/pipeline/manager/issue/IssueManager.java
@Transactional(propagation = Propagation.REQUIRED)
    public IssueComment deleteComment(Long issueId, Long commentId) {
        loadIssueAndCheckIfNotClosed(issueId);
        Optional<IssueComment> comment = commentDao.loadComment(commentId);
        comment.ifPresent(loadedComment -> {
            validateIssueId(issueId, loadedComment);
            attachmentFileManager.deleteAttachments(attachmentDao.loadAttachmentsByCommentIds(
                Collections.singletonList(commentId)).getOrDefault(commentId, Collections.emptyList()));
            commentDao.deleteComment(commentId);
        });
        return comment.orElseThrow(getCommentNotFoundException(commentId));
    }
/**
     * Deletes comment specified by ID. If issue was closed or issue doesn't exist or comment doesn't exist an error
     * will be thrown.
     * @param issueId issue's ID
     * @param commentId comment's ID
     * @return deleted {@link IssueComment}
     */
Deletes comment specified by ID. If issue was closed or issue doesn't exist or comment doesn't exist an error
will be thrown.
@param issueId issue's ID
@param commentId comment's ID
@return deleted  IssueComment
Deletes comment specified by ID . If issue was closed or issue doesn ' t exist or comment doesn ' t exist an error will be thrown . @param issueId issue ' s ID @param commentId comment ' s ID @return deleted IssueComment
@Transactional(propagation = Propagation.REQUIRED)
    public IssueComment deleteComment(Long issueId, Long commentId) {
        loadIssueAndCheckIfNotClosed(issueId);
        Optional<IssueComment> comment = commentDao.loadComment(commentId);
        comment.ifPresent(loadedComment -> {
            validateIssueId(issueId, loadedComment);
            attachmentFileManager.deleteAttachments(attachmentDao.loadAttachmentsByCommentIds(
                Collections.singletonList(commentId)).getOrDefault(commentId, Collections.emptyList()));
            commentDao.deleteComment(commentId);
        });
        return comment.orElseThrow(getCommentNotFoundException(commentId));
    }
@ Transactional ( propagation = Propagation . REQUIRED ) public IssueComment deleteComment ( Long issueId , Long commentId ) { loadIssueAndCheckIfNotClosed ( issueId ) ; Optional < IssueComment > comment = commentDao . loadComment ( commentId ) ; comment . ifPresent ( loadedComment -> { validateIssueId ( issueId , loadedComment ) ; attachmentFileManager . deleteAttachments ( attachmentDao . loadAttachmentsByCommentIds ( Collections . singletonList ( commentId ) ) . getOrDefault ( commentId , Collections . emptyList ( ) ) ) ; commentDao . deleteComment ( commentId ) ; } ) ; return comment . orElseThrow ( getCommentNotFoundException ( commentId ) ) ; }
Deletes comment specified by ID.
Deletes comment specified by ID .