Skip to content

POA decline email #20918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

opticbob
Copy link
Contributor

@opticbob opticbob commented Feb 21, 2025

Summary

  • This work is behind a feature toggle (flipper): YES
  • (Summarize the changes that have been made to the platform): This PR adds a POA request notification model used to track emails sent in the POA request lifecycle, it adds a decline email sent when a representative declines a POA request, and adds the notification tracking to the existing digital submit confirmation email.
  • (If bug, how to reproduce)
  • (What is the solution, why is this the solution?): We needed the decline email and wanted a way to track all of the POA request emails sent.
  • (Which team do you work for, does your team own the maintenance of this component?): FAR/ARM. I'm not sure if we will own the future maintenance or if that will transfer to the ART team.
  • (If introducing a flipper, what is the success criteria being targeted?)

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change: Declining wouldn't send an email.
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing: Declining a POA request in the Accredited Representative Portal should send a decline email to the veteran who made the request.
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas) Most of the changes are in the AccreditedRepresentativePortal module. There are a few changes to Settings for sending the email, and a small change to the RepresentationManagement module to track the submit confirmation email.

Acceptance criteria

  • I updated & added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 21, 2025 23:03 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 21, 2025 23:20 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 24, 2025 21:02 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 24, 2025 22:29 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 25, 2025 17:37 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 25, 2025 22:31 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 25, 2025 22:43 Inactive
@opticbob opticbob self-assigned this Feb 25, 2025
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 25, 2025 23:15 Inactive
A new rubocop rule has been introduced recently that requires hash
key-values where the key and the value match like:a

notification_type: notification_type,

to be condensed to:

notification_type:,
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main February 26, 2025 02:00 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main March 7, 2025 20:50 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main March 7, 2025 21:20 Inactive
nihil2501
nihil2501 previously approved these changes Mar 10, 2025
Copy link
Contributor

@nihil2501 nihil2501 left a comment

Choose a reason for hiding this comment

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

LGTM

rjohnson2011
rjohnson2011 previously approved these changes Mar 10, 2025
Copy link
Contributor

@rjohnson2011 rjohnson2011 left a comment

Choose a reason for hiding this comment

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

Nice check on verifying no potential for PII exposure.

@opticbob opticbob dismissed stale reviews from rjohnson2011 and nihil2501 via 4d56919 March 10, 2025 20:14
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main March 10, 2025 20:16 Inactive
@opticbob
Copy link
Contributor Author

@nihil2501 @rjohnson2011 When you two have a chance can you take another look? I had to fix a merge conflict and that dismissed your reviews.

@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main March 11, 2025 19:55 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to 102754-digital-submit-decline-email-notification-in-va-notify-staging/main/main March 11, 2025 20:08 Inactive
Copy link
Contributor

@nihil2501 nihil2501 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@raudabaugh raudabaugh left a comment

Choose a reason for hiding this comment

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

Excellent work!

@raudabaugh raudabaugh merged commit b15269a into master Mar 12, 2025
22 of 24 checks passed
@raudabaugh raudabaugh deleted the 102754-digital-submit-decline-email-notification-in-va-notify-staging branch March 12, 2025 17:11
patrick-brown-oddball pushed a commit that referenced this pull request Mar 21, 2025
* [WIP]

* Schema changes

* [WIP] email job

* [WIP] foreign key fix

* Working migration for notifications

* rename type to avoid convention mismatch

* Redo association

* Make va notify notification optional

* Fix linting error

A new rubocop rule has been introduced recently that requires hash
key-values where the key and the value match like:a

notification_type: notification_type,

to be condensed to:

notification_type:,

* [WIP] email job spec

* Fix tests for POA email job

* [WIP] tests for notification class

* Fix POA request notification tests

* Remove unused traits

* notification_type -> type

* Remove migration

* Add decline email template_id to settings

* Email job now accepts notification and personalisation

* Make email job take existing notification record

We're going to start creating the POA request notification record before
enqueing the email job.  That way we can track when it doesn't have a
notification_id that ties it to a VANotify::Notification record.

* Enqueue decline email within decisions controller

* Add tests for sending decline emails

* Add POA request notification tracking to digital submit confirmation email

* Create notification record after guard

* Don't send email address as a sidekiq arg

We can look it up from the POA request notification record.

* Update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants