Email: Local teams — no Monday practice first week, first practice Tuesday Apr 7 #313

Closed
opened 2026-04-03 23:22:50 +00:00 by forgejo_admin · 3 comments

Type

Feature

Lineage

Standalone — local teams (16U/17U Local Kings) need to know first practice is Tuesday not Monday due to parent-player meeting.

Repo

forgejo_admin/basketball-api

User Story

As an admin,
I want to email local team parents about the first-week exception
So that no one shows up Monday Apr 6 expecting practice.

Context

16U Local Kings and 17U Local Kings normally practice Monday at BWill. But first week has no Monday practice — parent-player meeting + first practice is Tuesday Apr 7 at West High 6-8 PM. After that, Monday schedule resumes. 12 local team parents need this specific message.

Environment

File Targets

This can reuse the welcome-practice email endpoint from basketball-api#312 with a local-teams-only filter and customized first-week messaging. If #312 is done first, this may just be a targeted send with specific copy. If not, create a standalone function.

Files to potentially modify:

  • src/basketball_api/services/email.py — add local-team-specific content or reuse welcome template
  • src/basketball_api/routes/admin.py — use team filter on welcome-practice endpoint

Files NOT to touch:

  • src/basketball_api/models.py

Acceptance Criteria

  • Email clearly states: NO Monday practice Apr 6, first practice is Tuesday Apr 7 at West High 6-8 PM
  • States Monday schedule resumes the following week (Apr 13)
  • Only sent to parents of players on teams where name contains "Local" (query DB, do not hardcode team IDs)
  • Includes parent-player meeting info (first 10-15 min)
  • Logs to email_log table

Test Expectations

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

Constraints

  • May depend on basketball-api#312 (welcome-practice endpoint) — can share template
  • Use gmail-sdk via get_gmail_client(tenant, db)
  • Must support test_email param for approval gate
  • Query teams by name pattern (LIKE '%Local%'), NOT hardcoded team IDs

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • westside-basketball — project this affects
  • basketball-api#312 — welcome practice email (potential dependency)
### Type Feature ### Lineage Standalone — local teams (16U/17U Local Kings) need to know first practice is Tuesday not Monday due to parent-player meeting. ### Repo `forgejo_admin/basketball-api` ### User Story As an admin, I want to email local team parents about the first-week exception So that no one shows up Monday Apr 6 expecting practice. ### Context 16U Local Kings and 17U Local Kings normally practice Monday at BWill. But first week has no Monday practice — parent-player meeting + first practice is Tuesday Apr 7 at West High 6-8 PM. After that, Monday schedule resumes. 12 local team parents need this specific message. ### Environment - Cluster/namespace: prod / basketball-api - Service: basketball-api email service (gmail-sdk, westsidebasketball@gmail.com) ### File Targets This can reuse the welcome-practice email endpoint from basketball-api#312 with a local-teams-only filter and customized first-week messaging. If #312 is done first, this may just be a targeted send with specific copy. If not, create a standalone function. Files to potentially modify: - `src/basketball_api/services/email.py` — add local-team-specific content or reuse welcome template - `src/basketball_api/routes/admin.py` — use team filter on welcome-practice endpoint Files NOT to touch: - `src/basketball_api/models.py` ### Acceptance Criteria - [ ] Email clearly states: NO Monday practice Apr 6, first practice is Tuesday Apr 7 at West High 6-8 PM - [ ] States Monday schedule resumes the following week (Apr 13) - [ ] Only sent to parents of players on teams where name contains "Local" (query DB, do not hardcode team IDs) - [ ] Includes parent-player meeting info (first 10-15 min) - [ ] Logs to email_log table ### Test Expectations - [ ] Test email to draneylucas@gmail.com renders correctly - [ ] `pytest tests/ -k email` passes - Run command: `pytest tests/` ### Constraints - May depend on basketball-api#312 (welcome-practice endpoint) — can share template - Use gmail-sdk via `get_gmail_client(tenant, db)` - Must support test_email param for approval gate - Query teams by name pattern (LIKE '%Local%'), NOT hardcoded team IDs ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `westside-basketball` — project this affects - `basketball-api#312` — welcome practice email (potential dependency)
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-764-2026-04-03

Issue references basketball-api#281 as the welcome-practice endpoint, but #281 is actually a closed CRM issue. The correct dependency is #312.

  • [BODY] Fix issue reference: #281#312 in File Targets and Related sections
  • [BODY] Add note to verify team_id 6/7 map to correct Local Kings teams before hardcoding
  • [SCOPE] Create architecture note arch-basketball-api
## Scope Review: NEEDS_REFINEMENT Review note: `review-764-2026-04-03` Issue references `basketball-api#281` as the welcome-practice endpoint, but #281 is actually a closed CRM issue. The correct dependency is `#312`. - `[BODY]` Fix issue reference: `#281` → `#312` in File Targets and Related sections - `[BODY]` Add note to verify team_id 6/7 map to correct Local Kings teams before hardcoding - `[SCOPE]` Create architecture note `arch-basketball-api`
Author
Owner

Scope refinement (review-764-2026-04-03):

  1. Wrong issue ref fixed — changed #281 (closed CRM issue) to #312 (welcome practice email) in File Targets and Related sections.
  2. Hardcoded team IDs removed — AC and Constraints now specify querying teams by name pattern (LIKE '%Local%'), not hardcoded IDs.
**Scope refinement (review-764-2026-04-03):** 1. **Wrong issue ref fixed** — changed `#281` (closed CRM issue) to `#312` (welcome practice email) in File Targets and Related sections. 2. **Hardcoded team IDs removed** — AC and Constraints now specify querying teams by name pattern (`LIKE '%Local%'`), not hardcoded IDs.
Author
Owner

Scope Review: APPROVED (re-review)

Review note: review-764-2026-04-03-r2

All three issues from initial review resolved:

  • Wrong issue reference #281 → now correctly references #312
  • Hardcoded team IDs → now queries by name pattern LIKE '%Local%'
  • Missing arch note → acknowledged as non-blocking backlog item

One non-blocking [SCOPE] item retained: Create architecture note arch-basketball-api (applies to all basketball-api tickets).

Ticket is ready for dispatch.

## Scope Review: APPROVED (re-review) Review note: `review-764-2026-04-03-r2` All three issues from initial review resolved: - Wrong issue reference #281 → now correctly references #312 - Hardcoded team IDs → now queries by name pattern LIKE '%Local%' - Missing arch note → acknowledged as non-blocking backlog item One non-blocking [SCOPE] item retained: Create architecture note `arch-basketball-api` (applies to all basketball-api tickets). Ticket is ready for dispatch.
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#313
No description provided.