fix(sla): validate Business Hours timezone as an IANA name (MAPPS-240) #239

Merged
vas2000-work merged 1 commit from fix/MAPPS-240-business-hours-timezone-validation into main 2026-06-17 02:50:35 +02:00
Owner

The Business Hours form already validates name + schedule JSON, but the timezone was sent unchecked, so a typo only failed as an opaque 422. Validate a non-empty timezone with chrono_tz before submit and reject inline; empty still defaults to UTC.

(Note: the original MAPPS-240 also alleged the schedule JSON was unvalidated - that part is already handled in handle_save, so this PR is scoped to the timezone gap only.)

Verified in-container (just pre-commit): fmt + clippy + wasm check + unit tests green.

Fixes MAPPS-240.

The Business Hours form already validates name + schedule JSON, but the timezone was sent unchecked, so a typo only failed as an opaque 422. Validate a non-empty timezone with chrono_tz before submit and reject inline; empty still defaults to UTC. (Note: the original MAPPS-240 also alleged the schedule JSON was unvalidated - that part is already handled in handle_save, so this PR is scoped to the timezone gap only.) Verified in-container (just pre-commit): fmt + clippy + wasm check + unit tests green. Fixes MAPPS-240.
fix(sla): validate Business Hours timezone as an IANA name
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 2m2s
Create release / Create release from merged PR (pull_request) Has been skipped
47c141d1b4
The Business Hours form already validates the name and the schedule JSON,
but the timezone field was sent unchecked, so a typo (e.g. "Mars/Phobos")
only failed as an opaque 422. Validate a non-empty timezone with
chrono_tz before submit and reject it inline; empty still defaults to UTC.

#MAPPS-240

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vas2000-work deleted branch fix/MAPPS-240-business-hours-timezone-validation 2026-06-17 02:50:35 +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!239
No description provided.