Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logging): log case has been linked to incident when incident has a name #5457

Merged
merged 3 commits into from
Nov 13, 2024
Merged
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
17 changes: 9 additions & 8 deletions src/dispatch/case/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,15 @@ def common_escalate_flow(
db_session.add(incident)
db_session.commit()

# we run the incident create flow in a background task
incident = incident_flows.incident_create_flow(
incident_id=incident.id,
organization_slug=organization_slug,
db_session=db_session,
case_id=case.id,
)

# we link the case to the incident
case.incidents.append(incident)
db_session.add(case)
db_session.commit()
Expand All @@ -755,14 +764,6 @@ def common_escalate_flow(
case_id=case.id,
)

# we run the incident create flow in a background task
incident = incident_flows.incident_create_flow(
incident_id=incident.id,
organization_slug=organization_slug,
db_session=db_session,
case_id=case.id,
)

# we add the case participants to the incident
for participant in case.participants:
# check to see if already a participant in the incident
Expand Down
Loading