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
21 changes: 12 additions & 9 deletions src/dispatch/plugins/dispatch_slack/case/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@


def create_case_message(case: Case, channel_id: str) -> list[Block]:
fields = [
f"*Assignee* \n {case.assignee.individual.email}",
f"*Status* \n {case.status}",
f"*Severity* \n {case.case_severity.name}",
f"*Type* \n {case.case_type.name}",
f"*Priority* \n {case.case_priority.name}",
]

if case.signal_instances:
fields.append(f"*Variant* \n {case.signal_instances[0].signal.variant}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on making the variant value a link to the signal definition external link if this exists?


blocks = [
Context(elements=[f"* {case.name} - Case Details*"]),
Section(
Expand All @@ -44,15 +55,7 @@ def create_case_message(case: Case, channel_id: str) -> list[Block]:
),
),
Section(text=f"*Description* \n {case.description}"),
Section(
fields=[
f"*Assignee* \n {case.assignee.individual.email}",
f"*Status* \n {case.status}",
f"*Severity* \n {case.case_severity.name}",
f"*Type* \n {case.case_type.name}",
f"*Priority* \n {case.case_priority.name}",
]
),
Section(fields=fields),
]

button_metadata = SubjectMetadata(
Expand Down