[Koha-bugs] [Bug 32520] Make patron autocomplete respect DefaultPatronSearchFields

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Dec 28 18:10:50 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520

ByWater Sandboxes <bws.sandboxes at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #144862|0                           |1
        is obsolete|                            |

--- Comment #3 from ByWater Sandboxes <bws.sandboxes at gmail.com> ---
Created attachment 144868
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144868&action=edit
Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete

This patch updates js_includes.inc to set a new global js variable
`defaultPatronSearchFields` with the content of the corresponding system
preference.

We then update the patron_autocomplete function to use this new global
variable and iterate in the same way as
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc.

NOTE: This changes the behaviour of the autocomplete from always
searching using contains on surname or firstname or starts with on
cardnumber to searching using 'contains' on any of the fields listed in
the DefaultPatronSearchFields system preference of defaulting to
'firstname,middle_name,surname,othernames,cardnumber,userid'.

Test plan
1. Ensure autocomplete still works everywhere
2. Confirm the system preference fields are being used.

Signed-off-by: Barbara Johnson <barbara.johnson at bedfordtx.gov>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list