Skip to content

Commit

Permalink
Merge pull request Yelp#2978 from ferozsalam/fix-jira-alert-titles
Browse files Browse the repository at this point in the history
Fix the use of timestamps in the Jira ticket titles
  • Loading branch information
Qmando authored Nov 9, 2020
2 parents ea62cf4 + 734caf2 commit 1dc4f30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elastalert/alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,9 @@ def create_default_title(self, matches, for_search=False):
if for_search:
return title

title += ' - %s' % (pretty_ts(matches[0][self.rule['timestamp_field']], self.rule.get('use_local_time')))
timestamp = matches[0].get(self.rule['timestamp_field'])
if timestamp:
title += ' - %s' % (pretty_ts(timestamp, self.rule.get('use_local_time')))

# Add count for spikes
count = matches[0].get('spike_count')
Expand Down

0 comments on commit 1dc4f30

Please sign in to comment.