Skip to content

Commit ad38ed8

Browse files
committed
latest changes based on owners comments
1 parent 0e848dc commit ad38ed8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notify.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (r *Receiver) Notify(data *alertmanager.Data) (bool, error) {
6666

6767
resolutionTime := time.Time(issue.Fields.Resolutiondate)
6868
if resolutionTime.Add(time.Duration(*r.conf.ReopenDuration)).After(time.Now()) {
69-
log.Infof("Issue %s for %s was resolved on %s, reopening", issue.Key, issueLabel, resolutionTime.Format(time.UnixDate))
69+
log.Infof("Issue %s for %s was resolved on %s, reopening", issue.Key, issueLabel, resolutionTime.Format(time.RFC3339))
7070
return r.reopen(issue.Key)
7171
}
7272
}
@@ -171,7 +171,7 @@ func toIssueLabel(groupLabels alertmanager.KV) string {
171171
}
172172

173173
func (r *Receiver) search(project, issueLabel string) (*jira.Issue, bool, error) {
174-
query := fmt.Sprintf("project=\"%s\" and labels=%q order by key", project, issueLabel)
174+
query := fmt.Sprintf("project=\"%s\" and labels=%q order by key desc", project, issueLabel)
175175
options := &jira.SearchOptions{
176176
Fields: []string{"summary", "status", "resolution", "resolutiondate"},
177177
MaxResults: 2,

0 commit comments

Comments
 (0)