fix(tickets): honour contact_id filter on list_tickets (MAPPS-311) #362
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-server!362
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-311-tickets-contact-id-filter"
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?
QA report: a freshly-created contact's "Recent Tickets" rail rendered
tenant-wide tickets instead of the contact's. Confirmed the SPA sends
?contact_id={id}correctly; the bug was on the server.build_ticket_filter_sqlhad branches forstatus_id,priority_id,queue_id,company_id,assigned_to_id,asset_id, etc., but nobranch for
filter.contact_id. The DTO field deserialised so no 422fired, but the value was dropped on the way into the SQL. Add the
mirror branch alongside
company_idandasset_id.Integration test
list_filters_by_contact_idseeds two contacts onthe same company, attaches a ticket to one;
?contact_id={A}returnsonly that ticket,
?contact_id={B}returns nothing, the unfilteredlist still includes the ticket.
#MAPPS-311
QA report: a freshly-created contact's "Recent Tickets" rail rendered tenant-wide tickets instead of the contact's. Confirmed the SPA sends `?contact_id={id}` correctly; the bug was on the server. `build_ticket_filter_sql` had branches for `status_id`, `priority_id`, `queue_id`, `company_id`, `assigned_to_id`, `asset_id`, etc., but no branch for `filter.contact_id`. The DTO field deserialised so no 422 fired, but the value was dropped on the way into the SQL. Add the mirror branch alongside `company_id` and `asset_id`. Integration test `list_filters_by_contact_id` seeds two contacts on the same company, attaches a ticket to one; `?contact_id={A}` returns only that ticket, `?contact_id={B}` returns nothing, the unfiltered list still includes the ticket. #MAPPS-311