Skip to content

Commit

Permalink
Ensure case tickets are updated (#5367)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 authored Oct 26, 2024
1 parent 2dde1cc commit 8c7742a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dispatch/case/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ def case_closed_status_flow(case: Case, db_session=None):
if not storage_plugin:
return

# we update the ticket
ticket_flows.update_case_ticket(case=case, db_session=db_session)

# Open document access if configured
if storage_plugin.configuration.open_on_close:
for document in case.documents:
Expand Down
13 changes: 13 additions & 0 deletions src/dispatch/plugins/dispatch_slack/case/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
SignalFilterCreate,
SignalInstance,
)
from dispatch.ticket import flows as ticket_flows

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -1008,6 +1009,10 @@ def handle_case_participant_role_activity(
organization_slug=context["subject"].organization_slug,
)
case.status = CaseStatus.triage

# we update the ticket
ticket_flows.update_case_ticket(case=case, db_session=db_session)

case_flows.update_conversation(case, db_session)
db_session.commit()

Expand Down Expand Up @@ -1073,6 +1078,10 @@ def reopen_button_click(
ack()
case = case_service.get(db_session=db_session, case_id=context["subject"].id)
case.status = CaseStatus.triage

# we update the ticket
ticket_flows.update_case_ticket(case=case, db_session=db_session)

db_session.commit()

# update case message
Expand Down Expand Up @@ -1644,6 +1653,10 @@ def triage_button_click(
)
case.status = CaseStatus.triage
db_session.commit()

# we update the ticket
ticket_flows.update_case_ticket(case=case, db_session=db_session)

case_flows.update_conversation(case, db_session)


Expand Down

0 comments on commit 8c7742a

Please sign in to comment.