From 2ed3927127491a0e462ba938dae5552255dd4220 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Mon, 16 Oct 2023 09:44:50 -0700 Subject: [PATCH] Link directly to dispatch (#3844) --- src/dispatch/case/messaging.py | 5 +++-- src/dispatch/messaging/strings.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dispatch/case/messaging.py b/src/dispatch/case/messaging.py index 9cb7780f6e1d..dd6ff82f9cfd 100644 --- a/src/dispatch/case/messaging.py +++ b/src/dispatch/case/messaging.py @@ -13,6 +13,7 @@ CASE_TRIAGE_REMINDER, MessageType, ) +from dispatch.config import DISPATCH_UI_URL from dispatch.plugin import service as plugin_service @@ -36,7 +37,7 @@ def send_case_close_reminder(case: Case, db_session: SessionLocal): items = [ { "name": case.name, - "ticket_weblink": case.ticket.weblink, + "dispatch_ui_case_url": f"{DISPATCH_UI_URL}/{case.project.organization.name}/cases/{case.name}", # noqa "title": case.title, "status": case.status, } @@ -70,9 +71,9 @@ def send_case_triage_reminder(case: Case, db_session: SessionLocal): items = [ { "name": case.name, - "ticket_weblink": case.ticket.weblink, "title": case.title, "status": case.status, + "dispatch_ui_case_url": f"{DISPATCH_UI_URL}/{case.project.organization.name}/cases/{case.name}", # noqa } ] diff --git a/src/dispatch/messaging/strings.py b/src/dispatch/messaging/strings.py index 877dac1ce69b..5849375b5aed 100644 --- a/src/dispatch/messaging/strings.py +++ b/src/dispatch/messaging/strings.py @@ -627,7 +627,7 @@ class MessageType(DispatchEnum): CASE_CLOSE_REMINDER = [ { "title": "{{name}} Case - Close Reminder", - "title_link": "{{ticket_weblink}}", + "title_link": "{{dispatch_ui_case_url}}", "text": CASE_CLOSE_REMINDER_DESCRIPTION, }, CASE_TITLE, @@ -637,7 +637,7 @@ class MessageType(DispatchEnum): CASE_TRIAGE_REMINDER = [ { "title": "{{name}} Case - Triage Reminder", - "title_link": "{{ticket_weblink}}", + "title_link": "{{dispatch_ui_case_url}}", "text": CASE_TRIAGE_REMINDER_DESCRIPTION, }, CASE_TITLE,