(a6023e2) Stamp the time a ticket entered its status, and bump to 0.17.1

mv writes Committed On, Submitted On or Completed On for the status it
enters, so the board answers how long a ticket has been where it is
without guessing from file mtimes.

The three are mutually exclusive: entering stamps, leaving removes and
re-entering restamps, so a backward move under -f leaves no stale
Completed On behind. These fields are current state, like Status itself;
the trail of how the ticket got there belongs to the history log.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ansho Rei
2026-08-22 20:31:53 +02:00
co-authored by Claude Opus 5
parent 373ba519b3
commit 139c9b012f
9 changed files with 454 additions and 8 deletions
+10
View File
@@ -662,6 +662,16 @@ pub fn cmd_mv(ticket_id: &str, target: Status, force: bool, start: &Path) -> Res
// refused for that reason rather than for whatever the lookup notices first.
let content = set_status_field(&resolved, target_status, &title)?;
// Behind every refusal above, so a move that does not happen writes no stamp, and
// spliced in here rather than after the rename so it travels with the same
// crash-safe write the Status field does.
let content = set_status_stamp(
&content,
target,
&Local::now().format(TIMESTAMP_FORMAT).to_string(),
&title,
)?;
let found_filename =
find_ticket_file(&current_path, &parse_ticket_field(&resolved, "ID"), &title)?;