]> git.koha-community.org Git - koha.git/commit
Bug 33117: Adding new PatronAutoCompleteSearchMethod system preference
authorLaura Escamilla <laura.escamilla@bywatersolutions.com>
Fri, 26 May 2023 16:19:54 +0000 (16:19 +0000)
committerPedro Amorim <pedro.amorim@ptfs-europe.com>
Tue, 18 Jul 2023 11:15:34 +0000 (11:15 +0000)
commitd1be3c746b81d9eed738887009e43ab37075d4b5
treeff2e102436d8e7ba2b3dfac4260e742d40a83c6f
parent04463e39ff9db0c32b1a3aa6ed9409a743516007
Bug 33117: Adding new PatronAutoCompleteSearchMethod system preference

This patch adds a new system preference called "PatronAutoCompleteSearchMethod"
which allows staff to choose between "Starts with" or "Contains" when
searching for patrons.

The "Contains" option should be useful when searching for patrons that have
multiple surnames or when searching using a patron's middle name.

New Test Plan:
 0. Ensure system preference PatronAutoComplete is set to Try
 1. Create a patron that has a first name, middle name and two surnames.
    (i.e. Adela Maria, Hernandez Acosta).
 2. In patron or checkout search, enter their first name and first
    surname without submitting.
 3. Confirm that a record is found in the autocomplete results
 4. In patron or checkout search, enter their first name and second
    surname without submitting.
 5. Confirm that no record is found.
 6. Enter their middle name and first surname. Confirm that no record is
    found.
 7. Enter their middle name and second surname. Confirm that no record
    is found.
 8. Apply the patch, update database
 9. Under Administration > Global System Preferences > search for
    "PatronAutocompleteSearchMethod"
10. Choose "Contains" instead of "Starts with" for the system
    preference, reload your search page
11. Repeat steps 2-4. The patron record should appear for all search
    methods.
12. Sign off!

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7b675997b4ed5bd076ada5cedcbbc039e0fabe7b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e5e9f2c203982ceacd3b328589f327e1b0ba7b9e)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
installer/data/mysql/atomicupdate/bug_33117.pl [new file with mode: 0644]
installer/data/mysql/mandatory/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js