Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions treeherder/perf/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@ def update_status(self, using=None):
self.status = self.autodetermine_status()
self.save(using=using)

def update_bug_due_date(self, alert_created, using=None):
self.bug_due_date = calculate_time_to(alert_created, BUG_DAYS)
self.save(using=using)

def autodetermine_status(self, alert_model=None):
summary_class = self.__class__
if not alert_model:
Expand Down Expand Up @@ -669,6 +673,7 @@ def save(self, *args, **kwargs):
# so the summary properly updates there
using = kwargs.get("using", None)
self.summary.update_status(using=using)
self.summary.update_bug_due_date(self.created, using=using)
if self.related_summary:
self.related_summary.update_status(using=using)

Expand Down