feat(issue): add --from/--to bulk project-to-project mode to lc issue move - #189
Conversation
… move Extends the existing `issue move` subcommand (which moves explicit issue IDs to a target project via --project) with a second mode for bulk project-level transfer: `lc issue move --from Source --to Target`. The bulk mode resolves both projects (UUID used directly; name searched within the given --team), guards against same-project moves, lists all open issues from the source (or all with --all), then fans out concurrent mutations via Task.async_stream following the same pattern as issue_status/1. Per-issue "moved to" lines are printed and a summary count is shown on completion. With --output json the array of updated issue records is emitted. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8105c54 to
35e1cec
Compare
Three issues from the code review, all in the bulk project-to-project mode:
1. Silent decline: user declining the confirmation prompt now prints
"Move cancelled" (matching the ID-based mode's behaviour).
2. Partial --from/--to: passing only one of --from/--to now returns a
clear error ("--from and --to must both be given for bulk mode")
instead of silently falling through to ID mode with a confusing message.
3. UUID-as-name in output: resolving a project by UUID now creates a
synthetic struct with a short label ("00000000…") rather than the
full UUID string, keeping summary lines readable.
Three new tests cover the reworked behaviour: bulk decline prints
"Move cancelled", --from without --to exits 22 with a clear message,
--to without --from exits 22 with a clear message.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rework summary (addressing code review feedback)Three minor issues from the review have been addressed in commit 1. Silent decline in bulk mode → fixedWhen the user declines the File: 2. Partial
|
Summary
Extends the existing
lc issue movecommand (which moves explicit issue IDs via--project) with a second bulk project-to-project mode:lc issue move --from SOURCE --to TARGET.--from/--to/--alloptions alongside the existing--project/--team(single spec, two modes)issue_move/1dispatches on presence of--from/--tovs issue IDs — all existing ID-based behavior is unchanged--team), guards against same-project moves, lists open issues from source (mine: false,all: flags.all), then fans out concurrent mutations (max 20, ordered, 30s timeout) following theissue_status/1pattern--output jsonemits an array of updated issue maps;--dry-runlists without mutatingTest plan
issue move --from/--totests: happy path (3 mutations),--all(no date guards in filter),--dry-run(no mutations), error mid-batch (non-zero exit),--output json(decodable array of 3), UUID bypass (no$teamIdquery), same-ID guard (halts before list query)mix cipasses (compile clean, credo no issues, usage_rules sync, 340/340 tests)Closes EXT-10.
🤖 Generated with Claude Code