You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.4 KiB
1.4 KiB
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| Add status convenience sub-commands (open, start, complete, close) | todo | feature | normal | 2026-03-10T23:30:31Z | 2026-03-10T23:30:31Z |
Problem
nbd update <id> --status <x> is verbose for the most common lifecycle transitions. nbd archive already exists as a top-level convenience — the same pattern should apply to all transitions.
Sub-commands to add
| Command | Status set |
|---|---|
nbd open <id> |
todo |
nbd start <id> |
in_progress |
nbd complete <id> |
done |
nbd close <id> |
closed |
(nbd archive already exists — do not duplicate it.)
Implementation
src/main.rs
Add four variants to the Commands enum, following the existing Archive pattern (line 183):
Open { id: String },
Start { id: String },
Complete { id: String },
Close { id: String },
Add handler functions cmd_open, cmd_start, cmd_complete, cmd_close. Each handler should:
- Call
resolve_id(supports partial IDs) find_ticket_path+detect_formatto preserve existing file formatread_ticket- Set
ticket.statusto the target status write_ticketin the same format- Print the ticket (tabular or JSON via
--json)
Wire up in dispatch() following the same pattern as Commands::Archive.
tests/integration.rs
Add integration tests for each command analogous to the existing archive test.