From 1742b529be957034f12bbbe4938c44d2e3b6f801 Mon Sep 17 00:00:00 2001 From: David Whittaker <84562015+whitdog47@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:31:15 -0700 Subject: [PATCH] Run transition flow to move to triage state (#4542) --- .../plugins/dispatch_slack/case/interactive.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/dispatch/plugins/dispatch_slack/case/interactive.py b/src/dispatch/plugins/dispatch_slack/case/interactive.py index 7bc72e80d4dd..f826613b8b72 100644 --- a/src/dispatch/plugins/dispatch_slack/case/interactive.py +++ b/src/dispatch/plugins/dispatch_slack/case/interactive.py @@ -828,9 +828,16 @@ def handle_case_participant_role_activity( # if a participant is active mark the case as being in the triaged state case = case_service.get(db_session=db_session, case_id=context["subject"].id) + if case.status == CaseStatus.new: - case.status = CaseStatus.triage - db_session.commit() + case_flows.case_status_transition_flow_dispatcher( + case=case, + current_status=CaseStatus.triage, + db_session=db_session, + previous_status=case.status, + organization_slug=context["subject"].organization_slug, + ) + case_flows.update_conversation(case, db_session)