Skip to content

Fix notification preference update handling and verification messaging AB#17079#6722

Open
BrianMaki wants to merge 8 commits into
devfrom
tasks/17079
Open

Fix notification preference update handling and verification messaging AB#17079#6722
BrianMaki wants to merge 8 commits into
devfrom
tasks/17079

Conversation

@BrianMaki
Copy link
Copy Markdown
Collaborator

@BrianMaki BrianMaki commented May 22, 2026

Fixes or Implements AB#17079

Description

Summary

This PR fixes notification preference handling for both single-model and multi-model update flows.

Service Changes

  • Updated single-model notification preference updates to only apply provided EmailEnabled or SmsEnabled values. This is used by UI
  • Updated multi-model notification preference updates to preserve existing channel values when one channel is omitted. This is used by email and sms verification services
  • Fixed PHSA notification event creation so outgoing messages include the correct combined email and SMS preference state.
  • Prevented email verification from dropping existing SMS preference values in the PHSA event.
  • Prevented SMS verification from dropping existing email preference values in the PHSA event.
  • Removed obsolete notification backfill and ClearSmsNumber jobs that are no longer required after the notification preference handling changes.

UI Changes

  • Prevented NotificationComponent from making unnecessary calls to the update endpoint.
  • Fixed the verified SMS message so it is not shown after an email change.

Testing

  • Verified both single-model and multi-model update paths.
  • Verified PHSA event payloads preserve existing notification preference values.
  • Verified unnecessary UI update calls no longer occur.

Unit tests:

Screenshot 2026-05-22 at 3 06 36 PM

Functional Tests:

https://cloud.cypress.io/projects/ofnepc/runs/6741/overview?roarHideRunsWithDiffGroupsAndTags=1

Testing

  • Unit Tests Updated
  • Functional Tests Updated
  • Not Required

UI Changes

No visual change but refresh logic was modified.

Notes

Items to Review:

@BrianMaki BrianMaki added .NET Pull requests that update .net code unit tests ready UI labels May 22, 2026
@BrianMaki BrianMaki marked this pull request as ready for review May 22, 2026 23:05
@BrianMaki BrianMaki requested a review from sslaws as a code owner May 22, 2026 23:05
@sslaws sslaws requested a review from Copilot May 22, 2026 23:06
Copy link
Copy Markdown
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 adjusts notification preference update semantics (single-model vs multi-model) to avoid unintentionally overwriting omitted channel values, improves PHSA/outbox event target construction, and refines the profile UI behavior around notification toggles and SMS verification.

Changes:

  • Updated Gateway API notification setting updates to treat EmailEnabled/SmsEnabled as optional inputs and to emit preference events that preserve existing channel values where appropriate.
  • Refined WebClient notification toggling/verification flows (switch state handling, SMS verification/profile refresh, and verified SMS messaging behavior).
  • Removed obsolete JobScheduler backfill/cleanup jobs and their configuration.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Testing/functional/tests/cypress/integration/ui/user/profileNotificationSettings.js Updates Cypress assertions for rollback behavior during failed notification preference saves.
Apps/WebClient/src/ClientApp/src/components/private/profile/VerifySmsDialogComponent.vue Adds a profile refresh on successful SMS verification before emitting verified.
Apps/WebClient/src/ClientApp/src/components/private/profile/UserProfileSmsComponent.vue Resets the “verified SMS” message when the user’s email changes.
Apps/WebClient/src/ClientApp/src/components/private/profile/UserProfileNotificationsComponent.vue Simplifies channel state initialization and switch binding/rollback on save failure.
Apps/JobScheduler/src/Startup.cs Removes obsolete job option bindings.
Apps/JobScheduler/src/appsettings.json Removes obsolete job configuration blocks.
Apps/JobScheduler/src/Models/BatchJobOptionsBase.cs Removed (obsolete batch job options base).
Apps/JobScheduler/src/Models/NotificationBackfillOptions.cs Removed (obsolete notification backfill options).
Apps/JobScheduler/src/Models/ClearSmsNumberOptions.cs Removed (obsolete clear-SMS-number options).
Apps/JobScheduler/src/Jobs/NotificationBackfillJob.cs Removed (obsolete notification backfill job).
Apps/JobScheduler/src/Jobs/ClearSmsNumberJob.cs Removed (obsolete clear-SMS-number job).
Apps/GatewayApi/src/Services/UserProfileNotificationSettingService.cs Implements optional-channel update behavior and event target construction for both overloads.
Apps/GatewayApi/src/Services/IUserProfileNotificationSettingService.cs Updates contract docs to reflect optional channel inputs and event behavior.
Apps/GatewayApi/test/unit/Services.Test/UserProfileNotificationSettingServiceTests.cs Expands/adjusts unit tests to cover combined target logic and null/commit behaviors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Pull requests that update .net code ready UI unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants