Skip to content

Commit

Permalink
feat: set accepted at timestamp when status changes: triage -> active (
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeevan authored Aug 8, 2024
1 parent 4a8948e commit cd205af
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backend/app/tasks/incident_status_updated.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ def get_rule_triggers(self, new_status: IncidentStatus, old_status: IncidentStat
"""Get matching triggers for status change"""
triggers: list[str] = []

# transition from triage to active
if (
old_status.category == IncidentStatusCategoryEnum.TRIAGE
and new_status.category == IncidentStatusCategoryEnum.ACTIVE
):
triggers.append("incident.accepted")

# transition from active to closed
if (
new_status.category == IncidentStatusCategoryEnum.CLOSED
Expand Down

0 comments on commit cd205af

Please sign in to comment.