From 32bb9ea2367c3251e80b5f1d0296338ccfd7429a Mon Sep 17 00:00:00 2001 From: Tomasz Janiszewski Date: Wed, 3 Apr 2024 14:15:54 +0200 Subject: [PATCH] fix missing summary in html (#25) Signed-off-by: Tomasz Janiszewski --- main.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index d339c67..e06b536 100644 --- a/main.go +++ b/main.go @@ -300,13 +300,18 @@ func (j junit2jira) createIssueOrComment(tc testCase) (*testIssue, error) { logEntry(NA, summary).Debugf("Dry run: will just print issue\n %q", description) return nil, nil } - create, response, err := j.jiraClient.Issue.Create(newIssue(j.jiraProject, summary, description)) + issue = newIssue(j.jiraProject, summary, description) + create, response, err := j.jiraClient.Issue.Create(issue) if response != nil && err != nil { logError(err, response) return nil, fmt.Errorf("could not create issue %s: %w", summary, err) } - logEntry(create.Key, summary).Info("Created new issue") - issueWithTestCase.issue = create + // Response from API does not contain full object so we need to copy missing data + issue.Key = create.Key + issue.ID = create.ID + issue.Self = create.Self + logEntry(issue.Key, summary).Info("Created new issue") + issueWithTestCase.issue = issue issueWithTestCase.newJIRA = true return &issueWithTestCase, nil }