Bug 41048 - Add ability to disallow empty patron searches
Summary: Add ability to disallow empty patron searches
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords: RM_priority
Depends on: 41039
Blocks:
  Show dependency treegraph
 
Reported: 2025-10-17 16:53 UTC by Kyle M Hall (khall)
Modified: 2025-10-17 19:43 UTC (History)
4 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41048: Add ability to disallow empty patron searches (9.70 KB, patch)
2025-10-17 17:51 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2025-10-17 16:53:59 UTC
In high traffic environments with large numbers of patrons, empty patron searches can take a very long time and cause over-use of resources. It would be good to have the option to require search criteria for patron searches.
Comment 1 Kyle M Hall (khall) 2025-10-17 17:51:38 UTC
Created attachment 188111 [details] [review]
Bug 41048: Add ability to disallow empty patron searches

In high traffic environments with large numbers of patrons, empty patron searches can take a very long time and cause over-use of resources. It would be good to have the option to require search criteria for patron searches.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Enable DisallowEmptyPatronSearches
4) Browse to any patron search form ( such as members-home.pl, or the
   one on acqui/basket.pl )
5) Note the search button is disabled when the search is empty,
   and enabled which the search box contains text
Comment 2 Brendan Lawlor 2025-10-17 19:43:09 UTC
This works for the search_patron_filter input, but it's not exactly as describe in the DisallowEmptyPatronSearches preference.

Don't require/Require at least one search criterion when searching for patrons.

I think that category code and branch code filters should count as search criteria. I often use an empty search with those two filters so that would discourage me from using this preference even though I appreciate the need for conserving resources for better performance.

Would it be reasonable to enable the button on changing one of these filters too?
categorycode_filter, 
branchcode_filter

Also on the aquisitions basket manager  search there are a couple other search filters:
sort1_filter
sort2_filter