feat(players): add CSV and JSON import templates #82

Merged
umpire274 merged 2 commits from feature/download-import-template into main 2026-06-04 12:19:35 +02:00
umpire274 commented 2026-06-04 12:09:28 +02:00 (Migrated from github.com)
  • Add CSV template download option
  • Add JSON template download option
  • Include required player import fields
  • Include sample records in generated templates
  • Document away_number field in templates
- Add CSV template download option - Add JSON template download option - Include required player import fields - Include sample records in generated templates - Document away_number field in templates
chatgpt-codex-connector[bot] (Migrated from github.com) reviewed 2026-06-04 12:10:37 +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: 123431b554

ℹ️ 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:** `123431b554` <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>
@ -1152,3 +1164,51 @@ fn display_player_list(players: &[(Player, String)]) {
);
chatgpt-codex-connector[bot] (Migrated from github.com) commented 2026-06-04 12:10:38 +02:00

P1 Badge Generate a CSV template the importer accepts

Selecting the new CSV template option writes a file whose sample data has 10 columns (team_name,team_code,league_name,...), but import_csv only accepts 5, 7, or 8 fields in the order team,number,away_number,first_name,last_name,position,pitch,bat. A user who downloads this template and immediately imports it will get Invalid format (expected 5, 7, or 8 fields, got 10) for every data row, so the feature is unusable as a player import template.

Useful? React with 👍 / 👎.

**<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Generate a CSV template the importer accepts** Selecting the new CSV template option writes a file whose sample data has 10 columns (`team_name,team_code,league_name,...`), but `import_csv` only accepts 5, 7, or 8 fields in the order `team,number,away_number,first_name,last_name,position,pitch,bat`. A user who downloads this template and immediately imports it will get `Invalid format (expected 5, 7, or 8 fields, got 10)` for every data row, so the feature is unusable as a player import template. Useful? React with 👍 / 👎.
chatgpt-codex-connector[bot] (Migrated from github.com) commented 2026-06-04 12:10:38 +02:00

P1 Badge Generate JSON with the importer field names

The JSON template starts with team_name, but import_json requires a team string field and rejects records before it can import them. The same template also uses role/bats/throws while the importer expects position/bat/pitch, so downloaded JSON templates cannot be imported without manual rewrites.

Useful? React with 👍 / 👎.

**<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Generate JSON with the importer field names** The JSON template starts with `team_name`, but `import_json` requires a `team` string field and rejects records before it can import them. The same template also uses `role`/`bats`/`throws` while the importer expects `position`/`bat`/`pitch`, so downloaded JSON templates cannot be imported without manual rewrites. Useful? React with 👍 / 👎.
Sign in to join this conversation.
No description provided.