use of com.synopsys.integration.jira.common.cloud.builder.IssueRequestModelFieldsBuilder in project hub-alert by blackducksoftware.
the class JiraIssueCreationRequestCreator method createIssueRequestModel.
public IssueRequestModelFieldsBuilder createIssueRequestModel(String summary, String description, String projectId, String issueType, Collection<JiraCustomFieldConfig> customFields, MessageReplacementValues customFieldReplacementValues) {
IssueRequestModelFieldsBuilder fieldsBuilder = new IssueRequestModelFieldsBuilder().setSummary(summary).setDescription(description).setProject(projectId).setIssueType(issueType);
for (JiraCustomFieldConfig customField : customFields) {
MessageValueReplacementResolver messageValueReplacementResolver = new MessageValueReplacementResolver(customFieldReplacementValues);
String replacedFieldValue = messageValueReplacementResolver.createReplacedFieldValue(customField.getFieldOriginalValue());
customField.setFieldReplacementValue(replacedFieldValue);
JiraResolvedCustomField resolvedCustomField = jiraCustomFieldResolver.resolveCustomField(customField);
fieldsBuilder.setValue(resolvedCustomField.getFieldId(), resolvedCustomField.getFieldValue());
}
return fieldsBuilder;
}
Aggregations