Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@aaronherman
Copy link
Contributor

This pull request introduces functionality to notify users when the visibility of a case changes. The most important changes include adding a new message type for case visibility updates, updating the notification logic to handle visibility changes, and extending templates to include visibility information.

Notification Enhancements:

  • src/dispatch/case/messaging.py: Added CASE_VISIBILITY_CHANGE to the list of message types and updated the send_case_update_notifications function to detect and handle changes in case visibility. This includes appending the new message type to the notification template and passing the old and new visibility values to the notification context.

@aaronherman aaronherman requested review from Copilot and whitdog47 June 24, 2025 15:56
@aaronherman aaronherman added the enhancement New feature or request label Jun 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds notifications for when a case’s visibility changes by introducing a new message type and extending the notification logic and templates accordingly.

  • Adds CASE_VISIBILITY_CHANGE description and template in strings.py
  • Updates send_case_update_notifications to detect visibility changes and include old/new visibility in the context

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/dispatch/messaging/strings.py Introduce CASE_VISIBILITY_CHANGE_DESCRIPTION and template
src/dispatch/case/messaging.py Append new message type on visibility change and pass visibility context
Comments suppressed due to low confidence (2)

src/dispatch/case/messaging.py:223

  • Add unit tests for visibility change notifications to ensure that when previous_case.visibility differs from case.visibility, the CASE_VISIBILITY_CHANGE message is correctly sent and context variables are populated.
            if previous_case.visibility != case.visibility:

src/dispatch/messaging/strings.py:557

  • [nitpick] Consider adding a comment or updating the project documentation to mention the new CASE_VISIBILITY_CHANGE message type so that consumers of the messaging API know about this new notification.
CASE_VISIBILITY_CHANGE_DESCRIPTION = """

@aaronherman aaronherman merged commit 57273c8 into main Jun 24, 2025
9 checks passed
@aaronherman aaronherman deleted the feat/add-case-visibility-change-notificiations branch June 24, 2025 23:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants