Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
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
27 changes: 17 additions & 10 deletions src/dispatch/plugins/dispatch_slack/case/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1892,16 +1892,6 @@ def handle_resolve_submission_event(
current_user=user,
)

# we run the case update flow
case_flows.case_update_flow(
case_id=updated_case.id,
previous_case=previous_case,
db_session=db_session,
reporter_email=updated_case.reporter.individual.email if updated_case.reporter else None,
assignee_email=updated_case.assignee.individual.email if updated_case.assignee else None,
organization_slug=context["subject"].organization_slug,
)

# we update the case notification with the resolution, resolution reason and status
blocks = create_case_message(case=updated_case, channel_id=context["subject"].channel_id)
client.chat_update(
Expand All @@ -1910,6 +1900,23 @@ def handle_resolve_submission_event(
channel=updated_case.conversation.channel_id,
)

try:
# we run the case update flow
case_flows.case_update_flow(
case_id=updated_case.id,
previous_case=previous_case,
db_session=db_session,
reporter_email=updated_case.reporter.individual.email
if updated_case.reporter
else None,
assignee_email=updated_case.assignee.individual.email
if updated_case.assignee
else None,
organization_slug=context["subject"].organization_slug,
)
except Exception as e:
log.error(f"Error running case update flow from Slack plugin: {e}")


@app.shortcut(CaseShortcutCallbacks.report, middleware=[db_middleware, shortcut_context_middleware])
def report_issue(
Expand Down
Loading