Single-player contract email endpoint #462
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/basketball-api#462
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — discovered during contract schedule fix session 2026-04-12.
Repo
forgejo_admin/basketball-apiUser Story
As an admin
I want to send a branded contract email to a single player's parent
So that I can test or target individual contract sends without blasting all unsigned parents
Context
Currently the only way to send a branded contract email is
POST /admin/email/contract-reminder, which emails ALL unsigned rostered players' parents. Thetest_emailparam filters by parent email, not by player — useless for targeting a specific player. During the 2026-04-12 contract schedule fix, we had to fall back to raw Gmail (plain text, no branding) because there was no way to send a branded email for one player.File Targets
src/basketball_api/routes/admin.py— new endpointPOST /admin/email/contract/{player_id}src/basketball_api/services/email.py— reusesend_contract_reminder_emailor extract single-player variantFiles the agent should NOT touch:
src/basketball_api/services/contract_offers.py— contract minting logic, unrelatedAcceptance Criteria
POST /admin/email/contract/{player_id}sends branded contract email to that player's parent_brand_wrappertemplate system (Queens pink accent for Queens teams)?test_email=query param redirects the send to a test addressTest Expectations
pytest tests/ -k test_contract_emailConstraints
routes/admin.pysend_contract_reminder_emaillogic or extract shared helper_brand_wrapperwith division-aware accent colorChecklist
Related
westside-basketball— project this affectsstory:WS-S20— parent signs contracts digitallyPOST /admin/email/contract-reminder(blast endpoint)Scope Review: READY
Review note:
review-997-2026-04-12Ticket scope is solid — all template sections present, file targets verified against codebase, traceability complete (story:WS-S20 confirmed on project page). Single repo, 2 file targets, 5 AC — fits in one agent pass.
One non-blocking scope item:
[SCOPE]Create architecture notearch-email(pre-existing gap across all email tickets, not specific to this one)