We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 696df52 commit 5b8bdf4Copy full SHA for 5b8bdf4
1 file changed
main.go
@@ -256,6 +256,12 @@ func (j junit2jira) linkIssues(issues []*jira.Issue) error {
256
var result error
257
for x, issue := range issues {
258
for y := 0; y < x; y++ {
259
+ // Skip cases where we have the same inward and outward issue.
260
+ // Jira does not allow linking a ticket to itself.
261
+ if issue.Key == issues[y].Key {
262
+ continue
263
+ }
264
+
265
_, err := j.jiraClient.Issue.AddLink(&jira.IssueLink{
266
Type: jira.IssueLinkType{Name: linkType},
267
OutwardIssue: &jira.Issue{Key: issue.Key},
0 commit comments