Skip to content

Commit 32bb9ea

Browse files
authored
fix missing summary in html (#25)
Signed-off-by: Tomasz Janiszewski <tomek@redhat.com>
1 parent 03b0e38 commit 32bb9ea

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

main.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,18 @@ func (j junit2jira) createIssueOrComment(tc testCase) (*testIssue, error) {
300300
logEntry(NA, summary).Debugf("Dry run: will just print issue\n %q", description)
301301
return nil, nil
302302
}
303-
create, response, err := j.jiraClient.Issue.Create(newIssue(j.jiraProject, summary, description))
303+
issue = newIssue(j.jiraProject, summary, description)
304+
create, response, err := j.jiraClient.Issue.Create(issue)
304305
if response != nil && err != nil {
305306
logError(err, response)
306307
return nil, fmt.Errorf("could not create issue %s: %w", summary, err)
307308
}
308-
logEntry(create.Key, summary).Info("Created new issue")
309-
issueWithTestCase.issue = create
309+
// Response from API does not contain full object so we need to copy missing data
310+
issue.Key = create.Key
311+
issue.ID = create.ID
312+
issue.Self = create.Self
313+
logEntry(issue.Key, summary).Info("Created new issue")
314+
issueWithTestCase.issue = issue
310315
issueWithTestCase.newJIRA = true
311316
return &issueWithTestCase, nil
312317
}

0 commit comments

Comments
 (0)