Fix todo update dropping untouched fields

Merged
RO
5mo ago
+70-1

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 update preserved the new title but cleared the
    existing description and due date.
  • Fixes #485 — --due now 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 confirmed todos show returned due_on: "2027-01-15"
    while preserving title and description.
  • #458: Ran basecamp todos update <id> --title ... and confirmed todos show
    preserved the existing description and due date.
  • #485: Created the temporary todo with --due 2026-12-31 and confirmed the
    created todo returned due_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.