feat(projects): accept H:MM for the task estimated-hours field (PMS-319) #169
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-319-task-estimate-hhmm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements PMS-319.
Problem
The task "Estimated Hours" field (create and edit task forms) was
<input type="number">, soH:MMcould not be typed, and on the edit form an unparseable value routed throughinsert_opt_numwas sent asnull, silently wiping the stored estimate.Changes
src/utils/duration.rs:parse_input_to_hours/fmt_input_hours(thin wrappers over the PMS-314 minute helpers, sinceestimated_hoursis fractional hours) + unit tests.src/pages/projects.rs: both estimate inputs switch fromtype="number"to free-text with a placeholder + help. Create parses viaparse_input_to_hours. Edit validates before submit (empty clears it; valid sends hours; invalid errors and does not submit), replacing the silent-nullinsert_opt_num(removed, no other callers). Edit pre-fills viafmt_input_hoursso 1.5h shows as1:30/1.5.Verification
just pre-commit(pinned rust 1.94 = CI) passes: fmt, clippy-D warnings,cargo check --target wasm32-unknown-unknown, all 91 lib tests.Acceptance criteria
1:30-> 1.5h,0:30-> 0.5h; decimal (2.5,8) still works.🤖 Generated with Claude Code