fix(playball): use Player::jersey_number() for lineup resolution #77

Merged
umpire274 merged 1 commit from fix/issue-72-codex into main 2026-06-04 10:58:20 +02:00
umpire274 commented 2026-06-04 10:57:06 +02:00 (Migrated from github.com)
  • Fix away jersey number handling
  • Fix lineup import validation
  • Centralize jersey number logic
  • Fixes #72
- Fix away jersey number handling - Fix lineup import validation - Centralize jersey number logic - Fixes #72
chatgpt-codex-connector[bot] (Migrated from github.com) reviewed 2026-06-04 10:59:25 +02:00
chatgpt-codex-connector[bot] (Migrated from github.com) left a comment

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f6aee20a6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `8f6aee20a6` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
chatgpt-codex-connector[bot] (Migrated from github.com) commented 2026-06-04 10:59:25 +02:00

P2 Badge Reject duplicate away jersey mappings

When importing an away lineup, this now keys the roster map by away_number, but away_number is not constrained to be unique in the schema or player create/update flows, so two active players on the same team can share the same away jersey. In that case HashMap::insert silently overwrites the earlier player and the import can save a lineup for the wrong player instead of reporting an ambiguous jersey number; please detect duplicate display numbers while building the map and return a validation error.

Useful? React with 👍 / 👎.

**<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Reject duplicate away jersey mappings** When importing an away lineup, this now keys the roster map by `away_number`, but `away_number` is not constrained to be unique in the schema or player create/update flows, so two active players on the same team can share the same away jersey. In that case `HashMap::insert` silently overwrites the earlier player and the import can save a lineup for the wrong player instead of reporting an ambiguous jersey number; please detect duplicate display numbers while building the map and return a validation error. Useful? React with 👍 / 👎.
Sign in to join this conversation.
No description provided.