Skip to content

Conversation

@amandazhuyilan
Copy link
Contributor

@amandazhuyilan amandazhuyilan commented Nov 17, 2025

Description

AAI-461: send bundle approval emails to users when request is approved by bundle admins

Changes

  • Added delivery plumbing so every group approval calculates whether the status actually changed before queueing an email
    • the FastAPI admin endpoint now injects BackgroundTasks, Settings, and EmailService, returns the updated membership from _approve_group_membership, and only schedules send_group_membership_approved_email when send_email is enabled and the user has just transitioned to approved
  • Extended the BioCommons group approval route to share the same behavior and introduced a reusable send_group_membership_approved_email helper that builds the user-facing email with the bundle name and portal link so both admin and self-service approvals notify the user consistently
  • Updated related tests

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit / integration tests that prove my fix is effective or that my feature works
  • I have run all tests locally and they pass
  • I have updated the documentation (if applicable)
  • For any new secrets, I have updated the shared spreadsheet and the GitHub Secrets.

Copy link
Collaborator

@marius-mather marius-mather left a comment

Choose a reason for hiding this comment

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

Looks good, just a couple of nitpicks with the code

Copy link
Collaborator

@marius-mather marius-mather left a comment

Choose a reason for hiding this comment

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

good to go

@amandazhuyilan amandazhuyilan merged commit fda00a8 into main Nov 17, 2025
4 checks passed
@amandazhuyilan amandazhuyilan deleted the feat/send-approval-emails branch November 24, 2025 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants