Bug 34592: Patron Search filter fields needs to be at least an empty array
authorMichael Hafen <michael.hafen@washk12.org>
Thu, 24 Aug 2023 16:27:36 +0000 (10:27 -0600)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 31 Aug 2023 10:46:34 +0000 (10:46 +0000)
commit3d07cffeb487579bf715ab05b8d6a1ffec5e7946
tree63c6d18a9be7e6116456ed204df85b65f253f91b
parent2fa6c105b1a319ce79305aef4b8c3115029ad504
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 275197f4052c1695994a978b9ade04b6fc38e910)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e24304ccd54156c8b7fa44dec283306ed02fd44f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/js/staff-global.js