fix(tickets): enforce required Company/Description inline on ticket forms (MAPPS-322) #372
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-322-enforce-required-ticket-fields"
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?
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 throughFormGuard::field(Rule::Required + Rule::Uuid) into a newcompany_errorsignal, 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
descriptionandcompany_idinto their respective inline error slots, mirroring the existing title routing.#MAPPS-322
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com