Add jersey fields to PlayerProfileResponse #257
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
ldraney/basketball-api#257
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?
Type
Feature
Lineage
Related to
forgejo_admin/westside-landing#197(jersey order card on player profile). That ticket needs jersey status visible in the profile response to render the card correctly.Repo
forgejo_admin/basketball-apiUser Story
As a parent viewing my child's profile
I want to see their jersey ordering status
So that I know whether I need to order a jersey or it's already handled
Context
PlayerProfileResponseinroutes/players.pycurrently returns player info (name, height, position, team, parent, etc.) but no jersey fields. The Player model already hasjersey_option,jersey_size,jersey_number, andjersey_order_status(verified in models.py lines 208-212). The AdminPlayerItem response already includes these fields (added in PRs #248/#249). This ticket mirrors that for the parent-facing profile endpoint.File Targets
Files the agent should modify or create:
src/basketball_api/routes/players.py-- Addjersey_option,jersey_size,jersey_number,jersey_order_statusfields toPlayerProfileResponse(line 40) and map them in_player_profile_response()(line 92)Files the agent should NOT touch:
src/basketball_api/routes/jersey.py-- jersey ordering routes, separate concernsrc/basketball_api/routes/admin.py-- admin already has these fieldsAcceptance Criteria
jersey_option,jersey_size,jersey_number, andjersey_order_statusTest Expectations
test_player_profile_includes_jersey_fields-- create player with jersey data, verify response includes all 4 fieldstest_player_profile_jersey_fields_null_when_empty-- player without jersey data returns null for all 4pytest tests/ -k test_player_profileConstraints
PlayerProfileResponse-- add fields at schema level, map in_player_profile_response()helperChecklist
Related
project-westside-basketballforgejo_admin/westside-landing#197-- frontend consumer of these fieldsforgejo_admin/basketball-api#248/#249-- admin version of same fields