Send request cancellation email to the request sender as well as the partner (5564)#5606
Open
augustocbx wants to merge 1 commit into
Open
Conversation
dorner
approved these changes
Jun 19, 2026
dorner
left a comment
Collaborator
There was a problem hiding this comment.
Passes tech review. Over to QA @ruestitch @janeewheatley
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5564
Description
When a request is cancelled, the cancellation notification email was only sent to the partner's main email address. As the issue notes, the partner's official email is often a higher-level contact or an address no longer monitored, so the person who actually submitted the request would not hear that it was cancelled.
This change adds the request sender to the recipients while keeping the partner. The sender is resolved through the existing
Request#requestermethod, which returns the requesting partner user when one is recorded and falls back to the partner otherwise. The recipient list is deduplicated, so a request with no associated user still results in a single email to the partner (no behaviour change for that case).Considered alternatives: reading
partner_userdirectly in the mailer, butrequesteralready encapsulates the "partner user or partner" fallback and is the documented way to identify who made the request.No user-facing workflow changes, so no documentation update is needed.
Type of change
How Has This Been Tested?
Added/updated examples in
spec/mailers/request_mailer_spec.rb:Commands run:
bundle exec rspec spec/mailers/request_mailer_spec.rb— 3 examples, 0 failuresbundle exec rspec spec/services/request_destroy_service_spec.rb— 8 examples, 0 failuresbundle exec rubocop app/mailers/request_mailer.rb spec/mailers/request_mailer_spec.rb— no offenses