Add graduating_class to roster API response model #70
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#70
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?
Lineage
plan-2026-03-08-tryout-prep→ Phase 4 → Phase 4pRepo
forgejo_admin/basketball-apiUser Story
As a coach viewing the SvelteKit dashboard
I want to see each player's graduating class
So that I can evaluate age-appropriate division placement
Context
The
RosterPlayerPydantic model in the roster API is missinggraduating_class. The SvelteKit dashboard readsp.graduating_classbut getsundefined, showing'?on every player card. ThePlayerSQLAlchemy model likely already has this field — the API response model just doesn't include it.Also: the dashboard shows "Incomplete" badges based on
profileComplete = !!(photo_url && position && height). Since 23/45 have no photos (files lost from ephemeral storage — separate issue 4o), this badge is misleading. The API should not include photo_url in any "completeness" logic.File Targets
Files the agent should modify:
src/basketball_api/routes/tryouts.py— Addgraduating_class: int | NonetoRosterPlayermodel. Addgraduating_class=p.graduating_classin theapi_roster()constructor (if the field exists on the Player model). If the Player model doesn't havegraduating_class, check forgraduation_yearor similar.tests/test_tryouts.py— Addgraduating_classto thetest_all_fields_presentexpected fields set. Add a test that graduating_class is returned when populated.Files the agent should NOT touch:
Acceptance Criteria
graduating_classappears in roster API responsenullwhen not set, integer when settest_all_fields_presentincludes the new fieldTest Expectations
pytest tests/test_tryouts.py -k "api_roster" -vpytest(full suite)Constraints
graduating_classdoesn't exist on the Player model, check forgraduation_yearorgrad_yearand map accordinglyNoneand note it in the PR descriptionChecklist
Related
project-westside-basketball