class IssueManager {

    @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;
    }

}