(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
+33
View File
@@ -489,6 +489,39 @@ fn show_renders_the_metadata_as_an_aligned_table() {
assert!(content.contains("- **Owner**: alice"));
}
/// The stamps `mv` writes are fields like any other: the table renders what the file
/// holds, so nothing here knows their names, and the column widens to the longest of
/// them the way it does for anything else.
#[test]
fn show_renders_a_status_stamp_in_the_metadata_table() {
let temp = TempDir::new().unwrap();
let worklane = setup_worklane(&temp);
let filename = "abc123def456789012345678901234567890_stamped.md";
fs::write(
worklane.join("committed").join(filename),
"# Stamped Ticket\n\n## Metadata\n\n\
- **ID**: abc123def456789012345678901234567890\n\
- **Created At**: 2026-08-20 15:51:01\n\
- **Committed On**: 2026-08-22 09:14:30\n\
- **Status**: committed\n",
)
.unwrap();
let mut cmd = Command::cargo_bin(BIN_NAME).unwrap();
cmd.current_dir(temp.path()).arg("show").arg("Stamped");
let stdout = get_stdout(&mut cmd);
assert!(
stdout.contains(
"Created At 2026-08-20 15:51:01\n\
Committed On 2026-08-22 09:14:30\n\
Status committed\n"
),
"{stdout:?}"
);
}
/// Write a ticket with an exact uuid and title, since both matter to resolution.
fn ticket_with(worklane: &std::path::Path, status: &str, uuid: &str, title: &str, slug: &str) {
fs::write(