(dca0b61) Add priority as a ticket field
Priority lived in tags, as p1 to p3, which ls could neither sort nor filter on, nothing validated, and a typo like P1 passed silently. ls sorted by title only, so a backlog of any size gave no ordering signal. Levels are 1 to 5 with 1 most urgent, matching what the tags meant. Omitting the flag leaves the field _Not set_, like Due and Owner: there is no implicit middle level, because a priority nobody chose is worse than none. clap rejects anything outside the range before a ticket is written. Priority parses to three states rather than two. A stored value outside the range is Invalid, kept distinct from Unset, so a typo cannot read as "no priority": it shows as ? and sorts just ahead of the unset tail. ls sorts on priority and falls back to the old title sort, and --priority filters, composing with the status filter in both the grouped and the filtered listing. TicketItem becomes a struct, since a sixth tuple field was past reading. Migrated the 31 tickets already carrying p1 to p3 tags: the level moves to the field and the tag is dropped. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b7781a830c
commit
ddbd45e332
+4
-2
@@ -24,6 +24,7 @@ fn main() -> Result<()> {
|
||||
tags,
|
||||
due,
|
||||
owner,
|
||||
priority,
|
||||
} => cmd_add(
|
||||
&title,
|
||||
&description,
|
||||
@@ -32,11 +33,12 @@ fn main() -> Result<()> {
|
||||
&tags,
|
||||
&due,
|
||||
&owner,
|
||||
priority,
|
||||
&start,
|
||||
),
|
||||
Command::Ls { status } => {
|
||||
Command::Ls { status, priority } => {
|
||||
let worklane_dir = find_worklane_dir(&start)?;
|
||||
cmd_ls(&status, &worklane_dir)
|
||||
cmd_ls(&status, priority, &worklane_dir)
|
||||
}
|
||||
Command::Show { id } => {
|
||||
let worklane_dir = find_worklane_dir(&start)?;
|
||||
|
||||
Reference in New Issue
Block a user