feat(nbd): add backlog status to tickets [c12091]
Adds a new `backlog` Status variant for tickets that are created but intentionally deferred. Backlog tickets are excluded from `nbd list`, `nbd ready`, and `nbd next` by default, but unlike `done` and `closed` they do not count as resolved for dependency purposes — a ticket whose dependency is `backlog` remains blocked. Visible via `--all` or `--filter status=backlog`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>quotesdb
parent
0ba22db39e
commit
7e311d6b47
@ -0,0 +1,80 @@
|
|||||||
|
+++
|
||||||
|
title = "Add backlog status to tickets"
|
||||||
|
priority = 5
|
||||||
|
status = "done"
|
||||||
|
ticket_type = "feature"
|
||||||
|
dependencies = []
|
||||||
|
+++
|
||||||
|
## Goal
|
||||||
|
|
||||||
|
Add a `backlog` status variant so tickets can be created without immediately surfacing in the active work queue. Tickets in `backlog` are created but intentionally deferred; they should not appear in `nbd list`, `nbd ready`, or `nbd next` by default.
|
||||||
|
|
||||||
|
## Semantics
|
||||||
|
|
||||||
|
- `backlog` = created, but not yet ready to be worked on (intentionally deferred)
|
||||||
|
- Default status for new tickets remains `todo`
|
||||||
|
- `backlog` tickets are excluded from `nbd list` (same as `done` and `closed`)
|
||||||
|
- `backlog` tickets are excluded from `nbd ready` and `nbd next`
|
||||||
|
- `backlog` tickets do **not** count as resolved for dependency purposes (unlike `done` and `closed`) — a dependency on a `backlog` ticket still blocks
|
||||||
|
- `backlog` tickets are visible with `--all`, `--filter status=backlog`, or `--filter status=*`
|
||||||
|
|
||||||
|
## Files to change
|
||||||
|
|
||||||
|
### `src/ticket.rs`
|
||||||
|
|
||||||
|
Add `Backlog` variant to the `Status` enum:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
pub enum Status {
|
||||||
|
#[default]
|
||||||
|
Todo,
|
||||||
|
InProgress,
|
||||||
|
Done,
|
||||||
|
Closed,
|
||||||
|
Backlog, // new
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Serialises as `"backlog"`.
|
||||||
|
|
||||||
|
### `src/main.rs`
|
||||||
|
|
||||||
|
- `parse_status`: add `"backlog" => Ok(Status::Backlog)` arm and update the error message
|
||||||
|
- `cmd_list`: exclude `Status::Backlog` in the default (no `--all`, no `status=` filter) case, alongside `Done` and `Closed`
|
||||||
|
- `cmd_ready`: exclude `Status::Backlog` from the ready set (a backlog ticket is never ready)
|
||||||
|
- `cmd_next`: same exclusion as `cmd_ready`
|
||||||
|
|
||||||
|
### `src/display.rs`
|
||||||
|
|
||||||
|
- `status_str`: add `Status::Backlog => "backlog"` arm
|
||||||
|
|
||||||
|
### `src/graph.rs`
|
||||||
|
|
||||||
|
- `status_str` (internal helper, duplicated): add `Status::Backlog => "backlog"` arm
|
||||||
|
|
||||||
|
### README.md
|
||||||
|
|
||||||
|
- Update the Status table to include `backlog`
|
||||||
|
- Update `nbd list` usage examples to mention that `backlog` is also hidden by default
|
||||||
|
|
||||||
|
### CLAUDE.md
|
||||||
|
|
||||||
|
- Update CLI Interface block to show `backlog` as a valid status value
|
||||||
|
|
||||||
|
### `src/tests.rs`
|
||||||
|
|
||||||
|
- Add unit test: a ticket with `Status::Backlog` is excluded from the ready list and is visible under `--all`
|
||||||
|
|
||||||
|
### `tests/integration.rs`
|
||||||
|
|
||||||
|
- Add integration test: create a ticket with `--status backlog`, confirm it does not appear in plain `nbd list` or `nbd ready`, and does appear in `nbd list --all`
|
||||||
|
|
||||||
|
## Validation
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo fmt && cargo check && cargo clippy && cargo test
|
||||||
|
cargo run -- create --title "Backlog item" --status backlog --json
|
||||||
|
cargo run -- list --json # should NOT appear
|
||||||
|
cargo run -- list --all --json # should appear
|
||||||
|
cargo run -- ready --json # should NOT appear
|
||||||
|
```
|
||||||
Loading…
Reference in New Issue