Skip to content

Commit 8ef5101

Browse files
committed
Add ReopenDuration handling: otherwise Jira issue is never reopened
1 parent 11f1d7d commit 8ef5101

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/notify/notify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ func (r *Receiver) findIssueToReuse(project string, issueGroupLabel string) (*ji
276276
}
277277

278278
resolutionTime := time.Time(issue.Fields.Resolutiondate)
279-
if resolutionTime != (time.Time{}) && resolutionTime.Add(time.Duration(*r.conf.ReopenDuration)).Before(r.timeNow()) {
279+
if resolutionTime != (time.Time{}) && resolutionTime.Add(time.Duration(*r.conf.ReopenDuration)).Before(r.timeNow()) && *r.conf.ReopenDuration != 0 {
280280
level.Debug(r.logger).Log("msg", "existing resolved issue is too old to reopen, skipping", "key", issue.Key, "label", issueGroupLabel, "resolution_time", resolutionTime.Format(time.RFC3339), "reopen_duration", *r.conf.ReopenDuration)
281281
return nil, false, nil
282282
}

0 commit comments

Comments
 (0)