Complete contract reminder email: merge branding fix, validate, blast #275
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
forgejo_admin/basketball-api#275
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
Continuation of
forgejo_admin/basketball-api #270. Branch270-contract-reminder-emailhas working code that never deployed cleanly due to CI failures (#274). This ticket completes the work once CI is green.Repo
forgejo_admin/basketball-apiUser Story
As Marcus,
I want to send contract reminder emails to all unsigned parents,
So that rosters are finalized by April 2nd.
Context
The contract reminder endpoint was built in #270 and merged to main (image
23902fe). However the Kings/Queens branding fix (dynamic accent color + program name) was added after the merge and lives only on branch270-contract-reminder-email. The deployed image has hardcoded pink with no team-based branding.Additionally the email-templates ConfigMap was manually patched during debugging and now has a reverted template (no
{{program_name}}/{{accent_color}}placeholders). It needs to be restored to the branched version.Prerequisite: CI fix #274 must be merged first so the pipeline auto-deploys.
Branding logic (already written, on branch):
#e91e8c(pink)#dc2626(red)#dc2626State of current ConfigMap template (needs restoring to use placeholders):
#e91e8c→ needs{{accent_color}}{{program_name}}#e91e8c→ needs{{accent_color}}Note on branch commits: The branch
270-contract-reminder-emailincludes two commits ahead of main:f8138d2— the original contract reminder endpoint (already in main via squash, may show as ahead due to history divergence — read the diff, don't re-apply)c8f0f1a— adds.distinct()to prevent duplicate players in multi-team scenario (NOT in main, must be included)Use
git diff main origin/270-contract-reminder-emailto see exactly what ships. Do not cherry-pick blindly.File Targets
src/basketball_api/services/email.py— branding fix already on branch. Diff includes_program_branding(), updated_build_player_section(accent_color), updatedsend_contract_reminder_email()that passesprogram_name+accent_colorto template. Also includes.distinct()fix.src/basketball_api/routes/admin.py—.distinct()fix on branch, must be includeddata/email-templates/contract-reminder.html— restore{{program_name}}and{{accent_color}}placeholders (branch version is correct)tests/test_contract_reminder.py— may have additions on branch; verify against main diffoverlays/basketball-api/prod/kustomization.yamlinforgejo_admin/pal-e-deployments(second repo) — update image tag after new image builds from this PRDo NOT touch: jersey routes, checkout routes, any other email functions.
PR Strategy
This work spans two repos:
forgejo_admin/basketball-api— open PR from270-contract-reminder-emailintomain. CI builds new image.forgejo_admin/pal-e-deployments— open a second PR updating thebasketball-apiimage tag inoverlays/basketball-api/prod/kustomization.yamlto the new digest once CI passes.Both PRs must merge for the deployment to go live.
Acceptance Criteria
POST /admin/email/contract-reminder?test_email=draneylucas@gmail.comsends branded email: red "WESTSIDE KINGS" header for Kings playerPOST /admin/email/contract-reminder?test_email=marcusdraney23@gmail.comsends branded email: pink "WESTSIDE QUEENS" header for Queens player (Marcus has "Test Queens Player" on 17U Elite Queens)POST /admin/email/contract-reminder(no param) sends to all 36 unsigned rostered parentsTest Expectations
tests/test_contract_reminder.pystill passpytest tests/test_contract_reminder.py -vConstraints
data/email-templates/contract-reminder.htmlin the repo. The deployment-patch or a separate kustomize configmap generator should pick it up. (Check how jersey-reminder.html gets into the ConfigMap — match that pattern exactly.)tofu plan -lock=falsenot applicable here270-contract-reminder-emailhas all the right code — read it before writing anything newgit diff main origin/270-contract-reminder-emailas ground truth for what needs to shipChecklist
Related
westside-basketball— project this affectsforgejo_admin/basketball-api #270— original contract reminder issueforgejo_admin/basketball-api #274— CI fix (must merge first)