Jersey reminder template needs division-aware image placeholders #10

Closed
opened 2026-04-08 20:48:43 +00:00 by forgejo_admin · 2 comments

Type

Bug

Lineage

Discovered after jersey reminder blast on 2026-04-08. 32 boys (Kings) received emails showing Queens jersey images.

Repo

forgejo_admin/westside-emails (template placeholders) and forgejo_admin/basketball-api (send function passes image URLs)

What Broke

The jersey-reminder.mjml template hardcodes Queens jersey images (IMG_4164.jpeg at line 42, IMG_4165.jpeg at line 78). Every parent gets Queens images regardless of division.

Repro Steps

  1. Send jersey reminder to any Kings parent
  2. Email shows Queens jersey images (black/pink and white/pink)
  3. Parent sees wrong gear

Expected Behavior

Kings parents see Kings jerseys (black/red). Queens parents see Queens jerseys (black/pink). Template uses {{jersey_image_1}} and {{jersey_image_2}} placeholders populated by the send function based on player.division.

Fix Required (Option B — placeholders, single template)

PR 1 — westside-emails: Replace hardcoded image URLs in src/jersey-reminder.mjml with {{jersey_image_1}} and {{jersey_image_2}} placeholders. Compile to HTML.

PR 2 — basketball-api: Update send_jersey_reminder_email in src/basketball_api/services/email.py:1140 to pass jersey_image_1 and jersey_image_2 to the template based on players[0].division. Kings images: assets/westside/jerseys/kings-home.jpeg and assets/westside/jerseys/kings-away.jpeg. Queens images: assets/westside/jerseys/queens-home.jpeg and assets/westside/jerseys/queens-away.jpeg.

Prerequisite: Kings jersey images must be uploaded to MinIO first (separate ops ticket).

Environment

  • Template: src/jersey-reminder.mjml in westside-emails
  • Send function: basketball_api/services/email.py:1140
  • Kings images: downloaded from GroupMe (March 29 WKQ Stakeholders), need MinIO upload
  • Queens images: already in MinIO as IMG_4164.jpeg and IMG_4165.jpeg, need rename

Acceptance Criteria

  • Template uses {{jersey_image_1}} and {{jersey_image_2}} placeholders (not hardcoded URLs)
  • send_jersey_reminder_email passes correct image URLs based on player division
  • Test email to Kings parent shows Kings jerseys
  • Test email to Queens parent shows Queens jerseys
  • project-westside-basketball — project this affects
  • story:WS-S22 — parent email communications
  • Prerequisite: MinIO image upload ticket (ops)
  • Follow-up: Resend corrected emails to 32 Kings families (separate blast-gated ticket)
### Type Bug ### Lineage Discovered after jersey reminder blast on 2026-04-08. 32 boys (Kings) received emails showing Queens jersey images. ### Repo `forgejo_admin/westside-emails` (template placeholders) and `forgejo_admin/basketball-api` (send function passes image URLs) ### What Broke The `jersey-reminder.mjml` template hardcodes Queens jersey images (`IMG_4164.jpeg` at line 42, `IMG_4165.jpeg` at line 78). Every parent gets Queens images regardless of division. ### Repro Steps 1. Send jersey reminder to any Kings parent 2. Email shows Queens jersey images (black/pink and white/pink) 3. Parent sees wrong gear ### Expected Behavior Kings parents see Kings jerseys (black/red). Queens parents see Queens jerseys (black/pink). Template uses `{{jersey_image_1}}` and `{{jersey_image_2}}` placeholders populated by the send function based on `player.division`. ### Fix Required (Option B — placeholders, single template) **PR 1 — westside-emails:** Replace hardcoded image URLs in `src/jersey-reminder.mjml` with `{{jersey_image_1}}` and `{{jersey_image_2}}` placeholders. Compile to HTML. **PR 2 — basketball-api:** Update `send_jersey_reminder_email` in `src/basketball_api/services/email.py:1140` to pass `jersey_image_1` and `jersey_image_2` to the template based on `players[0].division`. Kings images: `assets/westside/jerseys/kings-home.jpeg` and `assets/westside/jerseys/kings-away.jpeg`. Queens images: `assets/westside/jerseys/queens-home.jpeg` and `assets/westside/jerseys/queens-away.jpeg`. **Prerequisite:** Kings jersey images must be uploaded to MinIO first (separate ops ticket). ### Environment - Template: `src/jersey-reminder.mjml` in westside-emails - Send function: `basketball_api/services/email.py:1140` - Kings images: downloaded from GroupMe (March 29 WKQ Stakeholders), need MinIO upload - Queens images: already in MinIO as `IMG_4164.jpeg` and `IMG_4165.jpeg`, need rename ### Acceptance Criteria - [ ] Template uses `{{jersey_image_1}}` and `{{jersey_image_2}}` placeholders (not hardcoded URLs) - [ ] `send_jersey_reminder_email` passes correct image URLs based on player division - [ ] Test email to Kings parent shows Kings jerseys - [ ] Test email to Queens parent shows Queens jerseys ### Related - `project-westside-basketball` — project this affects - `story:WS-S22` — parent email communications - Prerequisite: MinIO image upload ticket (ops) - Follow-up: Resend corrected emails to 32 Kings families (separate blast-gated ticket)
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-893-2026-04-04
Ticket has good bug description but needs label fixes, scope narrowing, and decomposition before execution.

  • [LABEL] arch:westside-app is wrong — fix targets westside-emails + basketball-api. Change to arch:email
  • [SCOPE] No arch note exists for the email system — create arch-email or equivalent
  • [BODY] Choose Option B (template placeholders) explicitly — issue presents two options without deciding
  • [BODY] Remove AC6 (resend to 32 families) — operational blast requires separate ticket with blast gate approval
  • [BODY] Replace /tmp image paths with persistent source
  • [BODY] Document that two PRs are needed (one per repo)
  • [DECOMPOSE] 6 AC across 2 repos + MinIO + operational resend exceeds 5-minute rule. Route to skill-decompose-ticket for 3-ticket split: (A) MinIO image upload, (B) template + send function fix, (C) operational resend with blast gate
## Scope Review: NEEDS_REFINEMENT Review note: `review-893-2026-04-04` Ticket has good bug description but needs label fixes, scope narrowing, and decomposition before execution. - **[LABEL]** `arch:westside-app` is wrong — fix targets `westside-emails` + `basketball-api`. Change to `arch:email` - **[SCOPE]** No arch note exists for the email system — create `arch-email` or equivalent - **[BODY]** Choose Option B (template placeholders) explicitly — issue presents two options without deciding - **[BODY]** Remove AC6 (resend to 32 families) — operational blast requires separate ticket with blast gate approval - **[BODY]** Replace `/tmp` image paths with persistent source - **[BODY]** Document that two PRs are needed (one per repo) - **[DECOMPOSE]** 6 AC across 2 repos + MinIO + operational resend exceeds 5-minute rule. Route to `skill-decompose-ticket` for 3-ticket split: (A) MinIO image upload, (B) template + send function fix, (C) operational resend with blast gate
forgejo_admin changed title from Jersey reminder email shows wrong jersey images — needs division-aware templates to Jersey reminder template needs division-aware image placeholders 2026-04-08 20:54:20 +00:00
Author
Owner

Scope Review: READY

Review note: review-893-2026-04-04-r2

Re-review after refinement — all 7 recommendations from initial review (review-893-2026-04-04) have been addressed. Scope reduced to 4 ACs across 2 repos (template placeholders + send function). MinIO upload split to basketball-api#393. Resend deferred to separate blast-gated ticket. File targets verified, traceability complete. Ready for dispatch.

## Scope Review: READY Review note: `review-893-2026-04-04-r2` Re-review after refinement — all 7 recommendations from initial review (`review-893-2026-04-04`) have been addressed. Scope reduced to 4 ACs across 2 repos (template placeholders + send function). MinIO upload split to basketball-api#393. Resend deferred to separate blast-gated ticket. File targets verified, traceability complete. Ready for dispatch.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/westside-emails#10
No description provided.