feat(work-items): --start-date/--target-date on wi create and update - #16
Open
Liewzheng wants to merge 1 commit into
Open
feat(work-items): --start-date/--target-date on wi create and update#16Liewzheng wants to merge 1 commit into
Liewzheng wants to merge 1 commit into
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15
What
Adds date flags to work item create/update:
wi create --start-date YYYY-MM-DD --target-date YYYY-MM-DDwi update <issue> --start-date ... --target-date ...Why
Plane exposes
start_date/target_dateon 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 a200(asking fordue_dateis accepted and dropped), sowi updateverifies the echoed values after the write and raisesAPIErrorwhen the server did not apply the requested date (the ADR-0007 verify-the-write pattern).Notes
datetime.date.fromisoformat) withValidationError(exit 5) before any network call.wi updateonly touches a date when its flag is passed (is not None), so unset flags never clobber existing values.Nonepassthrough, 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 addsimage/forceparams in the same spot) — whichever lands second needs a one-line rebase.