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

Adding structured data #5034

Merged
merged 2 commits into from
Aug 3, 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
10 changes: 8 additions & 2 deletions src/dispatch/case/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,10 @@ def case_status_transition_flow_dispatcher(
db_session: Session,
):
"""Runs the correct flows based on the current and previous status of the case."""
log.info(f"Transitioning Status for Case #{case.id} from {previous_status} to {current_status}")
log.info(
"Transitioning Case status",
extra={"case_id": case.id, "previous_status": previous_status, "current_status": current_status}
)
match (previous_status, current_status):
case (CaseStatus.closed, CaseStatus.new):
# Closed -> New
Expand All @@ -569,7 +572,10 @@ def case_status_transition_flow_dispatcher(

case (_, CaseStatus.triage):
# Any -> Triage/
log.warning(f"Unexpected Status Transition for Case #{case.id} from {previous_status} to {current_status}")
log.warning(
"Unexpected previous state for Case transition to Triage state.",
extra={"case_id": case.id, "previous_status": previous_status, "current_status": current_status}
)

case (CaseStatus.new, CaseStatus.escalated):
# New -> Escalated
Expand Down
Loading