Bug 33428: Parse search fields in buildPatronSearchQuery
authorNick Clemens <nick@bywatersolutions.com>
Thu, 10 Aug 2023 18:58:55 +0000 (18:58 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 25 Sep 2023 13:53:46 +0000 (10:53 -0300)
commitb1b92cb9a494a05cdc1f83ef6cf3ebe4fcd13f00
tree8e3f90a0db513231688454d6df61664373f98a08
parenta06396c2826c604fc9dfe79c22256b6d69edc415
Bug 33428: Parse search fields in buildPatronSearchQuery

This patch moves the parsing of standard search_field into the buildPatronQuery subroutine
and adds a check for 'standard' field before adding attributes to the search

To test:
1 - Add a new attribute type and make it searchable
2 - Add a value to a patron
3 - Search for this value using 'Standard' fields, confirm you get the patron
4 - Search for the value using 'Cardnumber' field, confirm you get the patron - BAD!
5 - Apply patch
6 - Repeat cardnumebr search, confirm patron not found - Yay!
7 - Search standard, confirm patron is found
8 - Add a new field to 'DefaultPatronSearchFields
9 - Confirm it appears in patron search dropdown
10 - Confirm a search of this field with the attribute value does not return the patron

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc
koha-tmpl/intranet-tmpl/prog/js/staff-global.js