In the patron card creator, card batch. When doing a patron search in the patron search window, if only a sort field value is given the form gets submitted and the patron search window comes back without the sort fields.
Created attachment 154703 [details] [review] Bug 34592: Patron Search filter fields needs to be at least an empty array
The attachment has only a test plan, no patch!
Created attachment 154742 [details] [review] ug 34592: Patron Search filter fields needs to be at least an empty array (Sorry. I don't know how that happened.) If buildPatronSearchQuery() doesn't return an empty array when it exits early, then the code that adds the sort fields to the filters will fail. Test plan: If there is not all ready a patron with a sort1 or sort2 value from the bSort1 or bSort2 authorized values, add an authorized value if necessary, add a patron if necessary, and set the patrons sort field to the added value. In Tools -> Patron card creator start a new card batch. Click on Add Patron(s) to open the patron search window. pick the value in either the sort1 or sort2 drop down. Submit the page. The page will reload and there won't be results. Apply the patch, close the patron search window, clear the browser cache, reload the "New patron card batch" page, and open the patron search window again. Repeat the search. There will be results.
Created attachment 154802 [details] [review] Bug 34592: Patron Search filter fields needs to be at least an empty array If buildPatronSearchQuery() doesn't return an empty array when it exits early, then the code that adds the sort fields to the filters will fail. Test plan: - If there is not all ready a patron with a sort1 or sort2 value from the bSort1 or bSort2 authorized values, add an authorized value if necessary. - Add a patron if necessary, and set the patrons sort field to the added value. - In Tools -> Patron card creator start a new card batch. - Click on Add Patron(s) to open the patron search window. - Pick the value in either the sort1 or sort2 drop down. - Submit the page. The page will reload and there won't be results. - Apply the patch, close the patron search window, clear the browser cache, reload the "New patron card batch" page, and open the patron search window again. - Repeat the search. There will be results. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 154806 [details] [review] Bug 34592: Patron Search filter fields needs to be at least an empty array If buildPatronSearchQuery() doesn't return an empty array when it exits early, then the code that adds the sort fields to the filters will fail. Test plan: - If there is not all ready a patron with a sort1 or sort2 value from the bSort1 or bSort2 authorized values, add an authorized value if necessary. - Add a patron if necessary, and set the patrons sort field to the added value. - In Tools -> Patron card creator start a new card batch. - Click on Add Patron(s) to open the patron search window. - Pick the value in either the sort1 or sort2 drop down. - Submit the page. The page will reload and there won't be results. - Apply the patch, close the patron search window, clear the browser cache, reload the "New patron card batch" page, and open the patron search window again. - Repeat the search. There will be results. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 23.11. Nice work everyone, thanks!
Any changes to patron search should add selenium tests.
Pushed to 23.05.x for 23.05.04
Nice work everyone! Pushed to oldstable for 22.11.x