api/src/main/java/com/epam/pipeline/manager/issue/IssueManager.java
@Transactional(propagation = Propagation.REQUIRED)
    public Issue createIssue(IssueVO issueVO) {
        validateIssueParameters(issueVO);

        EntityVO entityVO = issueVO.getEntity();
        validateEntityParameters(entityVO);
        AbstractSecuredEntity entity = ensureEntityExists(entityVO);
        validateEntityCanBeModified(entityVO);

        Issue issue = issueMapper.toIssue(issueVO);
        issue.setAuthor(authManager.getAuthorizedUser());
        issueDao.createIssue(issue);

        issueVO.getAttachments().forEach(a -> attachmentDao.updateAttachmentIssueId(a.getId(), issue.getId()));

        notificationManager.notifyIssue(issue, entity,
                                        StringUtils.defaultIfBlank(issueVO.getHtmlText(), issue.getText()));

        return issue;
    }
/**
     * Creates a new issue that refers to existing {@link com.epam.pipeline.entity.AbstractSecuredEntity}.
     * If {@link com.epam.pipeline.entity.AbstractSecuredEntity} doesn't exist an error will be occurred.
     * @param issueVO {@link IssueVO} to create
     * @return create {@link Issue}
     */
Creates a new issue that refers to existing  com.epam.pipeline.entity.AbstractSecuredEntity.
If  com.epam.pipeline.entity.AbstractSecuredEntity doesn't exist an error will be occurred.
@param issueVO  IssueVO to create
@return create  Issue
Creates a new issue that refers to existing com . epam . pipeline . entity . AbstractSecuredEntity . If com . epam . pipeline . entity . AbstractSecuredEntity doesn ' t exist an error will be occurred . @param issueVO IssueVO to create @return create Issue
@Transactional(propagation = Propagation.REQUIRED)
    public Issue createIssue(IssueVO issueVO) {
        validateIssueParameters(issueVO);
        EntityVO entityVO = issueVO.getEntity();
        validateEntityParameters(entityVO);
        AbstractSecuredEntity entity = ensureEntityExists(entityVO);
        validateEntityCanBeModified(entityVO);
        Issue issue = issueMapper.toIssue(issueVO);
        issue.setAuthor(authManager.getAuthorizedUser());
        issueDao.createIssue(issue);
        issueVO.getAttachments().forEach(a -> attachmentDao.updateAttachmentIssueId(a.getId(), issue.getId()));
        notificationManager.notifyIssue(issue, entity,
                                        StringUtils.defaultIfBlank(issueVO.getHtmlText(), issue.getText()));
        return issue;
    }
@ Transactional ( propagation = Propagation . REQUIRED ) public Issue createIssue ( IssueVO issueVO ) { validateIssueParameters ( issueVO ) ; EntityVO entityVO = issueVO . getEntity ( ) ; validateEntityParameters ( entityVO ) ; AbstractSecuredEntity entity = ensureEntityExists ( entityVO ) ; validateEntityCanBeModified ( entityVO ) ; Issue issue = issueMapper . toIssue ( issueVO ) ; issue . setAuthor ( authManager . getAuthorizedUser ( ) ) ; issueDao . createIssue ( issue ) ; issueVO . getAttachments ( ) . forEach ( a -> attachmentDao . updateAttachmentIssueId ( a . getId ( ) , issue . getId ( ) ) ) ; notificationManager . notifyIssue ( issue , entity , StringUtils . defaultIfBlank ( issueVO . getHtmlText ( ) , issue . getText ( ) ) ) ; return issue ; }
Creates a new issue that refers to existing {@link com.epam.pipeline.entity.AbstractSecuredEntity}.
Creates a new issue that refers to existing { @link com . epam . pipeline . entity . AbstractSecuredEntity } .