From 11a2fece8232c5f9d0c453f4d9ca56e9bedc76bf Mon Sep 17 00:00:00 2001 From: Will Sheldon <114631109+wssheldon@users.noreply.github.com> Date: Wed, 6 Dec 2023 08:46:49 -0800 Subject: [PATCH] Change Case Page route to name and revert all previous changes (#4085) * Change Case Page route to name and revert all previous changes * Remove unused store variable --- src/dispatch/case/messaging.py | 4 +- .../plugins/dispatch_slack/case/messages.py | 2 +- .../static/dispatch/src/case/Page.vue | 42 +++++++++++------ .../static/dispatch/src/case/PageHeader.vue | 46 +++++++++++-------- .../static/dispatch/src/case/Table.vue | 2 +- .../static/dispatch/src/router/config.js | 2 +- 6 files changed, 61 insertions(+), 37 deletions(-) diff --git a/src/dispatch/case/messaging.py b/src/dispatch/case/messaging.py index 48f377b28191..ae9d54a02a15 100644 --- a/src/dispatch/case/messaging.py +++ b/src/dispatch/case/messaging.py @@ -37,7 +37,7 @@ def send_case_close_reminder(case: Case, db_session: SessionLocal): items = [ { "name": case.name, - "dispatch_ui_case_url": f"{DISPATCH_UI_URL}/{case.project.organization.name}/cases/{case.id}", # noqa + "dispatch_ui_case_url": f"{DISPATCH_UI_URL}/{case.project.organization.name}/cases/{case.name}", # noqa "title": case.title, "status": case.status, } @@ -77,7 +77,7 @@ def send_case_triage_reminder(case: Case, db_session: SessionLocal): "name": case.name, "title": case.title, "status": case.status, - "dispatch_ui_case_url": f"{DISPATCH_UI_URL}/{case.project.organization.name}/cases/{case.id}", # noqa + "dispatch_ui_case_url": f"{DISPATCH_UI_URL}/{case.project.organization.name}/cases/{case.name}", # noqa } ] diff --git a/src/dispatch/plugins/dispatch_slack/case/messages.py b/src/dispatch/plugins/dispatch_slack/case/messages.py index 76a52b52e83a..9163f6d57644 100644 --- a/src/dispatch/plugins/dispatch_slack/case/messages.py +++ b/src/dispatch/plugins/dispatch_slack/case/messages.py @@ -78,7 +78,7 @@ def create_case_message(case: Case, channel_id: str) -> list[Block]: accessory=Button( text="View", action_id="button-link", - url=f"{DISPATCH_UI_URL}/{case.project.organization.slug}/cases/{case.id}", + url=f"{DISPATCH_UI_URL}/{case.project.organization.slug}/cases/{case.name}", ), ), Section(text=f"*Description* \n {case.description}"), diff --git a/src/dispatch/static/dispatch/src/case/Page.vue b/src/dispatch/static/dispatch/src/case/Page.vue index d0fc5e364105..e679c53718ec 100644 --- a/src/dispatch/static/dispatch/src/case/Page.vue +++ b/src/dispatch/static/dispatch/src/case/Page.vue @@ -1,6 +1,7 @@