fix(time,projects,sla): clearer hours placeholder + bound task due-date range (PMS-346) #172

Merged
longjacksonle merged 1 commit from fix/PMS-317-followup-placeholder-and-date-bounds into main 2026-06-16 00:40:40 +02:00

Implements PMS-346 (follow-up to PMS-317), from user feedback.

Changes

  • Hours placeholder (Log Time, Edit Time Entry, task Estimated Hours, project Budget Hours, SLA first-response / resolution): now 2, 2.5, or 1:30 with help Decimal hours or H:MM., instead of leading with a fraction.
  • Due date: the field is a native <input type="date">, which only emits a valid date or empty, so the PMS-317 parse check never fired and an out-of-range year (e.g. 0007) still passed. Added min=2000-01-01 / max=2100-12-31 to both task Due Date inputs (create + edit) so the picker rejects out-of-range dates natively, and extended validate_opt_date to reject a parsed date outside that range as a backstop.

Known limitation (per the chosen approach)

A partially-typed date in a native picker is reported as empty by the browser, so it saves as "no due date" rather than erroring; due date stays optional. Catching that would require dropping the native picker for a strict text field.

Verification

just pre-commit (pinned rust 1.94 = CI) passes: fmt, clippy -D warnings, cargo check --target wasm32-unknown-unknown, all 91 lib tests.

🤖 Generated with Claude Code

Implements PMS-346 (follow-up to PMS-317), from user feedback. ## Changes - **Hours placeholder** (Log Time, Edit Time Entry, task Estimated Hours, project Budget Hours, SLA first-response / resolution): now `2, 2.5, or 1:30` with help `Decimal hours or H:MM.`, instead of leading with a fraction. - **Due date**: the field is a native `<input type="date">`, which only emits a valid date or empty, so the PMS-317 parse check never fired and an out-of-range year (e.g. `0007`) still passed. Added `min=2000-01-01` / `max=2100-12-31` to both task Due Date inputs (create + edit) so the picker rejects out-of-range dates natively, and extended `validate_opt_date` to reject a parsed date outside that range as a backstop. ## Known limitation (per the chosen approach) A partially-typed date in a native picker is reported as empty by the browser, so it saves as "no due date" rather than erroring; due date stays optional. Catching that would require dropping the native picker for a strict text field. ## Verification `just pre-commit` (pinned rust 1.94 = CI) passes: fmt, clippy `-D warnings`, `cargo check --target wasm32-unknown-unknown`, all 91 lib tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(time,projects,sla): clearer hours placeholder + bound task due-date range (PMS-346)
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m5s
d56d86a2fd
Follow-up to PMS-317 from user feedback.

Hours placeholder: every hours input (Log Time, Edit Time Entry, task Estimated Hours, project Budget Hours, SLA first-response / resolution) now shows all three accepted shapes "2, 2.5, or 1:30" with help "Decimal hours or H:MM.", instead of leading with a fraction.

Due date: the Due Date field is a native <input type="date">, which only ever emits a valid date or empty, so the PMS-317 parse check never fired and an out-of-range year (e.g. 0007) still passed. Add min=2000-01-01 / max=2100-12-31 to both task Due Date inputs (create + edit) so the picker rejects out-of-range dates natively, and extend validate_opt_date to reject a parsed date outside that range as a backstop. A partially-typed date in a native picker is still reported as empty by the browser (saves as "no due date"); due date stays optional, per the chosen approach.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch fix/PMS-317-followup-placeholder-and-date-bounds 2026-06-16 00:40:40 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!172
No description provided.