Search in sources :

Example 1 with JiraSearcherResponseModel

use of com.synopsys.integration.alert.api.channel.jira.distribution.search.JiraSearcherResponseModel in project hub-alert by blackducksoftware.

the class JiraCloudQueryExecutor method convertModel.

private JiraSearcherResponseModel convertModel(IssueResponseModel issue) {
    IssueFieldsComponent nullableIssueFields = issue.getFields();
    String existingIssueSummary = Optional.ofNullable(nullableIssueFields).map(IssueFieldsComponent::getSummary).orElse(issue.getKey());
    return new JiraSearcherResponseModel(issue.getSelf(), issue.getKey(), issue.getId(), existingIssueSummary);
}
Also used : IssueFieldsComponent(com.synopsys.integration.jira.common.model.components.IssueFieldsComponent) JiraSearcherResponseModel(com.synopsys.integration.alert.api.channel.jira.distribution.search.JiraSearcherResponseModel)

Aggregations

JiraSearcherResponseModel (com.synopsys.integration.alert.api.channel.jira.distribution.search.JiraSearcherResponseModel)1 IssueFieldsComponent (com.synopsys.integration.jira.common.model.components.IssueFieldsComponent)1