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(case): ensure case tickets are updated #5367

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
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
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
Loading