Bug 40898

Summary: Add ability to limit the number of columns a patron search api request can sort by
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: PatronsAssignee: Kyle M Hall (khall) <kyle>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Kyle M Hall (khall) 2025-09-29 15:46:11 UTC
Patron API searches can order by any borrowers column and can specify any number of columns to order by as well. Given sufficient numbers of patrons and unindexed columns sort by, the search query generated will create a temp table so large it can fill up the temp disk and prevent the db server from functioning.

A reasonable solution would be to create a system preference to set a maximum number of columns to sort by.