Bug 13822: Patron autocomplete search is severly limited
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 27 Mar 2015 15:21:39 +0000 (11:21 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 14 May 2015 14:11:09 +0000 (11:11 -0300)
commit1871d9a6e71f9abaadfcc86b50aab0cd038f7890
tree412d3b8e94ae2570a2c7244263b617985de926eb
parentdedd059ac006eefb9eb89c28dc3581ccaaf71098
Bug 13822: Patron autocomplete search is severly limited

The script that returns data for the patron autocomplete does not use C4::Members::Search. Instead it uses bespoke code that does not behave like the traditional search and is very limited in how it can search.

If, for example, I search for "Kyle Hall" in the standard search, I would get "Kyle Hall" back as a result. For the autocomplete search, I will not.

This script should use C4::Members::Search to provide better searching and to keep the code base DRY.

Test Plan:
1) Enable the system preference CircAutocompl
2) Create a user with the first name "Test" and the surname "User"
3) Perform a checkout autocomplete search for "Test User"
4) Note you do not get the user as a result
5) Apply this patch
6) Try different combinations of "Test" and "User" such as
   Test User
   User Test
   U Test
   Test U
   etc.
7) Note these searches now work

Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
circ/ysearch.pl