api/src/main/java/com/epam/pipeline/manager/issue/IssueManager.java
@Transactional(propagation = Propagation.REQUIRED)
    public IssueComment createComment(Long issueId, IssueCommentVO commentVO) {
        Issue issue = loadIssueAndCheckIfNotClosed(issueId);
        validateComment(commentVO);
        IssueComment comment = issueMapper.toIssueComment(commentVO);
        comment.setIssueId(issueId);
        comment.setAuthor(authManager.getAuthorizedUser());
        commentDao.createComment(comment);

        commentVO.getAttachments().forEach(a -> attachmentDao.updateAttachmentCommentId(a.getId(), comment.getId()));

        notificationManager.notifyIssueComment(comment, issue, StringUtils.defaultIfBlank(commentVO.getHtmlText(),
                                                                                          comment.getText()));
        return comment;
    }
/**
     * Creates comment for issue. If issue was closed or doesn't exist an error will be occurred.
     * @param issueId issue's ID
     * @param commentVO comment text
     * @return created {@link IssueComment}
     */
Creates comment for issue. If issue was closed or doesn't exist an error will be occurred.
@param issueId issue's ID
@param commentVO comment text
@return created  IssueComment
Creates comment for issue . If issue was closed or doesn ' t exist an error will be occurred . @param issueId issue ' s ID @param commentVO comment text @return created IssueComment
@Transactional(propagation = Propagation.REQUIRED)
    public IssueComment createComment(Long issueId, IssueCommentVO commentVO) {
        Issue issue = loadIssueAndCheckIfNotClosed(issueId);
        validateComment(commentVO);
        IssueComment comment = issueMapper.toIssueComment(commentVO);
        comment.setIssueId(issueId);
        comment.setAuthor(authManager.getAuthorizedUser());
        commentDao.createComment(comment);
        commentVO.getAttachments().forEach(a -> attachmentDao.updateAttachmentCommentId(a.getId(), comment.getId()));
        notificationManager.notifyIssueComment(comment, issue, StringUtils.defaultIfBlank(commentVO.getHtmlText(),
                                                                                          comment.getText()));
        return comment;
    }
@ Transactional ( propagation = Propagation . REQUIRED ) public IssueComment createComment ( Long issueId , IssueCommentVO commentVO ) { Issue issue = loadIssueAndCheckIfNotClosed ( issueId ) ; validateComment ( commentVO ) ; IssueComment comment = issueMapper . toIssueComment ( commentVO ) ; comment . setIssueId ( issueId ) ; comment . setAuthor ( authManager . getAuthorizedUser ( ) ) ; commentDao . createComment ( comment ) ; commentVO . getAttachments ( ) . forEach ( a -> attachmentDao . updateAttachmentCommentId ( a . getId ( ) , comment . getId ( ) ) ) ; notificationManager . notifyIssueComment ( comment , issue , StringUtils . defaultIfBlank ( commentVO . getHtmlText ( ) , comment . getText ( ) ) ) ; return comment ; }
Creates comment for issue.
Creates comment for issue .