fix(tickets): enforce required Company/Description inline on ticket forms (MAPPS-322) #372

Merged
Claude-Run merged 1 commit from fix/MAPPS-322-enforce-required-ticket-fields into main 2026-06-26 09:40:05 +02:00
Member

Make the New Ticket and Edit Ticket forms honour the red asterisks on Company and Description so the cues match real behaviour, completing the client side of the end-to-end enforcement (the server-type/validator/migration changes live in the separate mokosh-server repo).

CompanyPicker now takes an error: prop and forwards it to its wrapped Input, so a blank-company submit paints the red border + inline message on the picker instead of a generic form-level banner. The New Ticket submit guard routes Company through FormGuard::field (Rule::Required + Rule::Uuid) into a new company_error signal, cleared on select/clear like title/description.

Drop the "collapse empty description to null" branch in the create submit body: Description is validated non-empty by the guard, so the trimmed string is sent verbatim and a blank description can no longer slip through as null. The Edit Ticket PUT sends the trimmed, guard-validated description for the same reason (an edit can no longer blank an existing description).

Route server 422s for description and company_id into their respective inline error slots, mirroring the existing title routing.

#MAPPS-322

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Make the New Ticket and Edit Ticket forms honour the red asterisks on Company and Description so the cues match real behaviour, completing the client side of the end-to-end enforcement (the server-type/validator/migration changes live in the separate mokosh-server repo). CompanyPicker now takes an `error:` prop and forwards it to its wrapped Input, so a blank-company submit paints the red border + inline message on the picker instead of a generic form-level banner. The New Ticket submit guard routes Company through `FormGuard::field` (Rule::Required + Rule::Uuid) into a new `company_error` signal, cleared on select/clear like title/description. Drop the "collapse empty description to null" branch in the create submit body: Description is validated non-empty by the guard, so the trimmed string is sent verbatim and a blank description can no longer slip through as `null`. The Edit Ticket PUT sends the trimmed, guard-validated description for the same reason (an edit can no longer blank an existing description). Route server 422s for `description` and `company_id` into their respective inline error slots, mirroring the existing title routing. #MAPPS-322 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(tickets): enforce required Company/Description inline on ticket forms (MAPPS-322)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 1m24s
Create release / Create release from merged PR (pull_request) Has been skipped
f111ea0d4d
Make the New Ticket and Edit Ticket forms honour the red asterisks on Company and Description so the cues match real behaviour, completing the client side of the end-to-end enforcement (the server-type/validator/migration changes live in the separate mokosh-server repo).

CompanyPicker now takes an `error:` prop and forwards it to its wrapped Input, so a blank-company submit paints the red border + inline message on the picker instead of a generic form-level banner. The New Ticket submit guard routes Company through `FormGuard::field` (Rule::Required + Rule::Uuid) into a new `company_error` signal, cleared on select/clear like title/description.

Drop the "collapse empty description to null" branch in the create submit body: Description is validated non-empty by the guard, so the trimmed string is sent verbatim and a blank description can no longer slip through as `null`. The Edit Ticket PUT sends the trimmed, guard-validated description for the same reason (an edit can no longer blank an existing description).

Route server 422s for `description` and `company_id` into their respective inline error slots, mirroring the existing title routing.

#MAPPS-322

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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!372
No description provided.