Skip to content

feat(work-items): --start-date/--target-date on wi create and update - #16

Open
Liewzheng wants to merge 1 commit into
cpatrickalves:mainfrom
Liewzheng:feat/wi-date-flags
Open

feat(work-items): --start-date/--target-date on wi create and update#16
Liewzheng wants to merge 1 commit into
cpatrickalves:mainfrom
Liewzheng:feat/wi-date-flags

Conversation

@Liewzheng

Copy link
Copy Markdown

Closes #15

What

Adds date flags to work item create/update:

  • wi create --start-date YYYY-MM-DD --target-date YYYY-MM-DD
  • wi update <issue> --start-date ... --target-date ...

Why

Plane exposes start_date/target_date on work items, but the CLI had no way to set them — users had to fall back to raw API calls (resolve the UUID, PATCH the endpoint by hand). Also, the API silently ignores mis-spelled date fields with a 200 (asking for due_date is accepted and dropped), so wi update verifies the echoed values after the write and raises APIError when the server did not apply the requested date (the ADR-0007 verify-the-write pattern).

Notes

  • Dates are validated client-side (datetime.date.fromisoformat) with ValidationError (exit 5) before any network call.
  • wi update only touches a date when its flag is passed (is not None), so unset flags never clobber existing values.
  • Adds unit tests for the validator (None passthrough, valid dates, and a parametrized rejection set).

Tested: ruff check src/ clean; pytest tests/ -q — 191 passed (182 baseline + 9 new).

Note: touches the create()/update() signatures, so this may conflict trivially with #12 (attachments adds image/force params in the same spot) — whichever lands second needs a one-line rebase.

Plane exposes start_date/target_date on work items, but the CLI had no
way to set them, so users had to fall back to raw API calls (resolve the
UUID, PATCH the endpoint by hand). A five-step shell dance for a field
the SDK models already carry.

Also note the API silently ignores mis-spelled date fields with a 200
(asking for due_date is accepted and dropped), so wi update verifies
the echoed values after the write and raises APIError when the server
did not apply the requested date (ADR-0007 pattern).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: --start-date/--target-date on wi create and update

1 participant