Skip to content

feat: email the new owner when their ownership transfer completes - #1033

Open
DNR500 wants to merge 1 commit into
mainfrom
email-accept-or-decline-to-nominee
Open

DNR500 wants to merge 1 commit into
mainfrom
email-accept-or-decline-to-nominee

Conversation

@DNR500

@DNR500 DNR500 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Issue#1769 - sends the new owner a confirmation email once an ownership transfer completes.

What this does

  • When someone accepts an ownership nomination, they now get an email confirming it's done
  • The email explains what they can do now as owner (manage members, change settings, invite teachers, transfer ownership on, etc.) and links to the Help Center
  • No email is sent if the nominee declines instead

Why

Gives the new owner a clear record that the transfer went through, rather than them just finding out by noticing they now have owner access.

Copilot AI lite review requested due to automatic review settings September 23, 2026 15:08
@cla-bot cla-bot Bot added the cla-signed label Sep 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The email may be sent before roles are transferred and contains hardcoded production links.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds a confirmation email for nominees after an ownership transfer completes.

Changes:

  • Adds completion-email delivery and content.
  • Adds model and mailer specs plus a preview.
  • Includes owner guidance and Help Center links.
File Summary
spec/​models/​ownership_transfer_spec.rb Tests completion callback behavior.
spec/​mailers/​school_ownership_mailer_spec.rb Tests recipients and email content.
spec/​mailers/​previews/​school_ownership_mailer_preview.rb Adds a completion-email preview.
app/​views/​school_ownership_mailer/​complete_ownership_transfer.text.erb Defines the confirmation email; links require environment-specific hosts.
app/​models/​ownership_transfer.rb Adds completion-email delivery; role transfer must occur before sending.
app/​mailers/​school_ownership_mailer.rb Builds the new-owner confirmation email.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/models/ownership_transfer.rb
@github-actions

Copy link
Copy Markdown

Test coverage

93.69% line coverage reported by SimpleCov.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/35879375810

@zetter-rpf zetter-rpf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice one

This branch was successfully deployed

1 active deployment
editor-api-p-email-acce-1z0map — ad9f9cc0 Deployed Sep 23, 2026 by raspberrypiherokubot
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.

4 participants