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.
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
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