Fix todo update dropping untouched fields
Merged
RO
5mo ago+70+70+01234567890123456789-1-1-0123456789
Summary
- Fixes #412 —
todos update --due(and other partial updates) silently wiped
untouched fields because the BC3 API clears fields by omission. - Fixes #458 — title-only
todos updatepreserved the new title but cleared the
existing description and due date. - Fixes #485 —
--duenow persists on the update path; create-with-due is also
verified against the current branch. - The non-clear update path now fetches the existing todo first and seeds the
request with current values before applying user overrides, matching what the
clear path (--no-due,--no-description) already did. - Adds tests verifying that
--due-only and title-only updates preserve
content, description, dates, and assignees.
Live verification
Tested against the Rob Zolkos account in the Verdant Coffee Roasters project,
Fusilli todolist, using a locally built rebased branch.
- #412 / #485: Created a temporary todo, ran
basecamp todos update <id> --due 2027-01-15, and confirmedtodos showreturneddue_on: "2027-01-15"
while preserving title and description. - #458: Ran
basecamp todos update <id> --title ...and confirmedtodos show
preserved the existing description and due date. - #485: Created the temporary todo with
--due 2026-12-31and confirmed the
created todo returneddue_on: "2026-12-31".
Fixes #412
Fixes #458
Fixes #485
Summary by cubic
Fixes partial todos update wiping untouched fields. The command now fetches the existing todo and seeds the PUT body so content, description, due/start dates, and assignees are preserved.
- Bug Fixes
- Preload the update request with existing values before applying overrides to prevent BC3’s clear-by-omission behavior; matches clear-flag behavior.
- Added tests for
--due-only and title-only updates to confirm content, description, due_on, starts_on, and assignee_ids are retained.