From 74018e2a82dbd7dc311375efd0744a24767fb5b2 Mon Sep 17 00:00:00 2001 From: Neil Okamoto Date: Thu, 21 May 2026 12:15:43 -0700 Subject: [PATCH] Fix: resolve short Trello board ID to full 24-char hex ID during init When `trache init` is called with `--board-url`, the board ID extracted from the URL (e.g. `aBcDeFgH` from `https://trello.com/b/aBcDeFgH/my-board`) is a short ID. Trello accepts short IDs in URL paths for GET operations (`GET /1/boards/aBcDeFgH`), but rejects them in `idBoard` parameter values for POST/PUT operations such as creating labels (`POST /1/labels`) or creating lists (`POST /1/lists`). The `--new` code path already resolved this by saving `board_obj.id`, but the `--board-url` / `--board-id` code path only saved `board_obj.name` and left the short ID in `config.board_id`. This caused a confusing partial-failure pattern: reading boards, cards, and lists worked fine, but label creation and list creation failed with `400 {"message":"Invalid id"}`. After fetching the board during init, save the full 24-char hex ID from the API response back to `config.board_id`. --- src/trache/cli/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/trache/cli/app.py b/src/trache/cli/app.py index a38ab68..0643838 100644 --- a/src/trache/cli/app.py +++ b/src/trache/cli/app.py @@ -175,6 +175,7 @@ def init( try: board_obj = client.get_board(config.board_id) + config.board_id = board_obj.id # Resolve short ID → full 24-char hex ID config.board_name = board_obj.name out.human(f"Board: [bold]{escape(board_obj.name)}[/bold]") except Exception: