Email: Queens practice schedule — Friday moving to Wednesday at Granger #311

Closed
opened 2026-04-03 23:22:30 +00:00 by forgejo_admin · 1 comment

Type

Feature

Lineage

Standalone — Queens schedule changed from Friday BWill to Wednesday Granger. 14 Queens parents need notification.

Repo

forgejo_admin/basketball-api

User Story

As an admin,
I want to email Queens parents about the schedule change
So that families know practices moved from Friday at BWill to Wednesday at Granger.

Context

Queens practices changed: Friday BWill 7-9 PM → Wednesday Granger High School 6:30-7:30 PM. Tuesday West High 6-8 PM unchanged. DB already updated. 14 Queens parents across 2 teams (16U Elite Queens, 17U Elite Queens). One test record (Marcus Draney TEST) should be excluded.

Environment

File Targets

Files to create/modify:

  • src/basketball_api/services/email.py — add send_practice_schedule_email() function
  • src/basketball_api/templates/ — add MJML practice schedule template (if MJML dir exists, otherwise inline HTML)
  • src/basketball_api/routes/admin.py — add POST /admin/email/practice-schedule endpoint with team/division filter and test_email param

Files NOT to touch:

  • src/basketball_api/models.py
  • src/basketball_api/routes/schedule.py

Acceptance Criteria

  • Endpoint accepts division filter (girls) and optional test_email param
  • Email contains: new Wednesday schedule (Granger, 6:30-7:30 PM), Tuesday unchanged (West High, 6-8 PM), Granger address
  • Excludes test players (name contains "TEST")
  • Logs to email_log table
  • Test mode sends to single address instead of all parents

Test Expectations

  • Test email to draneylucas@gmail.com renders correctly
  • pytest tests/ -k email passes
  • Run command: pytest tests/

Constraints

  • Follow existing email patterns (see send_jersey_reminder_email for reference)
  • Use gmail-sdk via get_gmail_client(tenant, db)
  • Must support test_email param for approval gate

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • westside-basketball — project this affects
  • basketball-api#279 — practice schedule data seeding
### Type Feature ### Lineage Standalone — Queens schedule changed from Friday BWill to Wednesday Granger. 14 Queens parents need notification. ### Repo `forgejo_admin/basketball-api` ### User Story As an admin, I want to email Queens parents about the schedule change So that families know practices moved from Friday at BWill to Wednesday at Granger. ### Context Queens practices changed: Friday BWill 7-9 PM → Wednesday Granger High School 6:30-7:30 PM. Tuesday West High 6-8 PM unchanged. DB already updated. 14 Queens parents across 2 teams (16U Elite Queens, 17U Elite Queens). One test record (Marcus Draney TEST) should be excluded. ### Environment - Cluster/namespace: prod / basketball-api - Service: basketball-api email service (gmail-sdk, westsidebasketball@gmail.com) ### File Targets Files to create/modify: - `src/basketball_api/services/email.py` — add `send_practice_schedule_email()` function - `src/basketball_api/templates/` — add MJML practice schedule template (if MJML dir exists, otherwise inline HTML) - `src/basketball_api/routes/admin.py` — add `POST /admin/email/practice-schedule` endpoint with team/division filter and test_email param Files NOT to touch: - `src/basketball_api/models.py` - `src/basketball_api/routes/schedule.py` ### Acceptance Criteria - [ ] Endpoint accepts division filter (girls) and optional test_email param - [ ] Email contains: new Wednesday schedule (Granger, 6:30-7:30 PM), Tuesday unchanged (West High, 6-8 PM), Granger address - [ ] Excludes test players (name contains "TEST") - [ ] Logs to email_log table - [ ] Test mode sends to single address instead of all parents ### Test Expectations - [ ] Test email to draneylucas@gmail.com renders correctly - [ ] `pytest tests/ -k email` passes - Run command: `pytest tests/` ### Constraints - Follow existing email patterns (see `send_jersey_reminder_email` for reference) - Use gmail-sdk via `get_gmail_client(tenant, db)` - Must support test_email param for approval gate ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `westside-basketball` — project this affects - `basketball-api#279` — practice schedule data seeding
Author
Owner

Scope Review: READY

Review note: review-762-2026-04-03
Ticket is well-scoped: all template sections present, traceability verified (story:WS-S7 confirmed on project page), all 3 file targets verified in codebase, existing email endpoint pattern (jersey-reminder) provides clear implementation reference. 5 AC all testable. Single-repo, ~3 min agent work.

  • [SCOPE] arch-basketball-api note missing in pal-e-docs (shared gap, non-blocking)
## Scope Review: READY Review note: `review-762-2026-04-03` Ticket is well-scoped: all template sections present, traceability verified (story:WS-S7 confirmed on project page), all 3 file targets verified in codebase, existing email endpoint pattern (jersey-reminder) provides clear implementation reference. 5 AC all testable. Single-repo, ~3 min agent work. - [SCOPE] arch-basketball-api note missing in pal-e-docs (shared gap, non-blocking)
Sign in to join this conversation.
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/basketball-api#311
No description provided.