use of com.synopsys.integration.jira.common.server.model.IssueCreationRequestModel in project hub-alert by blackducksoftware.
the class JiraServerIssueCreator method createIssueCreationRequest.
@Override
protected IssueCreationRequestModel createIssueCreationRequest(IssueCreationModel alertIssueCreationModel, MessageReplacementValues replacementValues) throws AlertException {
ProjectComponent jiraProject = retrieveProjectComponent();
String issueSummary = distributionDetails.getIssueSummary();
String title = alertIssueCreationModel.getTitle();
if (StringUtils.isNotEmpty(issueSummary)) {
MessageValueReplacementResolver messageValueReplacementResolver = new MessageValueReplacementResolver(replacementValues);
title = messageValueReplacementResolver.createReplacedFieldValue(issueSummary);
}
IssueRequestModelFieldsMapBuilder fieldsBuilder = jiraIssueCreationRequestCreator.createIssueRequestModel(title, alertIssueCreationModel.getDescription(), jiraProject.getId(), distributionDetails.getIssueType(), replacementValues, distributionDetails.getCustomFields());
return new IssueCreationRequestModel(distributionDetails.getIssueCreatorUsername(), distributionDetails.getIssueType(), distributionDetails.getProjectNameOrKey(), fieldsBuilder);
}
Aggregations