Add missing parent_phone/parent_email to admin CRM response models #281

Closed
opened 2026-04-03 16:57:23 +00:00 by forgejo_admin · 1 comment

Type

Feature

Lineage

Related to forgejo_admin/basketball-api#278 (spike: audit API response contract mismatches with westside-landing frontend)

Repo

forgejo_admin/basketball-api

User Story

As an admin/coach/parent, I want the app to display complete player, parent, and coach information so that I can manage the program without missing data.

Context

Spike Mismatches 2, 5, 7: Several admin CRM response models are missing parent contact fields that the frontend expects.

  • IncompletePlayerItem — missing parent_phone (Mismatch 5)
  • TeamPlayerItem — missing parent_phone and parent_email (Mismatch 7)

Note: AdminPlayerItem.parent_phone was already fixed in #276, so this ticket covers the remaining two models.

File Targets

  • src/basketball_api/routes/admin.pyIncompletePlayerItem, TeamPlayerItem models

Acceptance Criteria

  • IncompletePlayerItem includes parent_phone: Optional[str]
  • TeamPlayerItem includes parent_phone: Optional[str] and parent_email: Optional[str]
  • Fields populated from parent relationship
  • All existing tests pass

Test Expectations

  • Unit tests verifying new fields appear in admin list responses
  • Test with players missing parent records (fields should be null)

Constraints

  • AdminPlayerItem.parent_phone already shipped in #276 — do not duplicate
  • Priority: MEDIUM

Checklist

  • Implementation complete
  • Tests written and passing
  • ruff format and ruff check clean
  • PR submitted
### Type Feature ### Lineage Related to forgejo_admin/basketball-api#278 (spike: audit API response contract mismatches with westside-landing frontend) ### Repo forgejo_admin/basketball-api ### User Story As an admin/coach/parent, I want the app to display complete player, parent, and coach information so that I can manage the program without missing data. ### Context Spike Mismatches 2, 5, 7: Several admin CRM response models are missing parent contact fields that the frontend expects. - `IncompletePlayerItem` — missing `parent_phone` (Mismatch 5) - `TeamPlayerItem` — missing `parent_phone` and `parent_email` (Mismatch 7) Note: `AdminPlayerItem.parent_phone` was already fixed in #276, so this ticket covers the remaining two models. ### File Targets - `src/basketball_api/routes/admin.py` — `IncompletePlayerItem`, `TeamPlayerItem` models ### Acceptance Criteria - [ ] `IncompletePlayerItem` includes `parent_phone: Optional[str]` - [ ] `TeamPlayerItem` includes `parent_phone: Optional[str]` and `parent_email: Optional[str]` - [ ] Fields populated from parent relationship - [ ] All existing tests pass ### Test Expectations - Unit tests verifying new fields appear in admin list responses - Test with players missing parent records (fields should be null) ### Constraints - `AdminPlayerItem.parent_phone` already shipped in #276 — do not duplicate - Priority: MEDIUM ### Checklist - [ ] Implementation complete - [ ] Tests written and passing - [ ] `ruff format` and `ruff check` clean - [ ] PR submitted ### Related - Spike: forgejo_admin/basketball-api#278 (Mismatches 2, 5, 7) - Prior fix: forgejo_admin/basketball-api#276
Author
Owner

Scope Review: READY

Review note: review-741-2026-04-03
Single-repo, single-file. IncompletePlayerItem (line 403) missing parent_phone, TeamPlayerItem (line 651) missing parent_phone + parent_email. Correctly avoids duplicating AdminPlayerItem fix from #276.

  • [SCOPE] Create architecture note arch-basketball-api
## Scope Review: READY Review note: `review-741-2026-04-03` Single-repo, single-file. IncompletePlayerItem (line 403) missing parent_phone, TeamPlayerItem (line 651) missing parent_phone + parent_email. Correctly avoids duplicating AdminPlayerItem fix from #276. - `[SCOPE]` Create architecture note arch-basketball-api
forgejo_admin 2026-04-03 17:54:21 +00:00
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#281
No description provided.