]> git.koha-community.org Git - koha.git/commit
Bug 28633: Add preferred name field to patrons
authorNick Clemens <nick@bywatersolutions.com>
Mon, 3 Jan 2022 15:24:01 +0000 (15:24 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 11 Nov 2024 13:12:09 +0000 (14:12 +0100)
commit2e83345479ad73fe616b326410451d0e3a758dc2
tree1010c937127b238fd9ed23a4b82557e5bb2fcea4
parent131ff0f4025eec5ac7d4b72c9add0e73d76cd7eb
Bug 28633: Add preferred name field to patrons

This patch adds a new field 'preferred_name' to the patron record.

On storage (creation or update) the preferred_name is set to the firstname if no
value is passed. Patron modifications will set the preferred name to the firstname if
the preferred_name field is hidden

With this patchset preferred_name will always be set - either to the firstname, or a specified value.

PatronAutoComplete/ysearch is updated to use 'preferred_name'

To test:
 1 - Apply patches
 2 - Update database and restart all, clear browser cache
 3 - Load a patron in staff module
 4 - Confirm you see and can add a preferred name
 5 - Confirm the preferred name and first name now displays on patron details
 6 - Remove first name from patron record and confirm it no longer shows
 7 - Edit sysprefs BorrowerMandatoryFields and BorrowerUnwantedFields to confirm you can make
     new field required or hidden
 8 - Sign in as patron to opac
 9 - Confirm preferred name shows
10 - Edit account on opac and confirm field is present
11 - Verify DefaultPatronSearchFields contains 'preferredname' if your pref had firstname
12 - Perform checkout and patron search using preferred_name, confirm patron is found
13 - Enable PatronAutoComplete system preference
14 - Type patron's surname into Checkout or patron search but don't hit enter
15 - Confirm patron is displayed with 'preferred_name' in the preview
16 - Set 'preferred_name' in all 'Unwanted' preferences
17 - Confirm editing a patron in staff interface sets both fields when firstname updated
18 - Confirm a patron modification sets both fields when firstname updated
19 - Create a patron / perform self registration and confirm both fields set when preferred_name is hidden
20 - Remove preferred_name from Unwanted prefs and confirm preferred_name is set to firstname if nothing passed

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
19 files changed:
Koha/Database/Columns.pm
Koha/Patron.pm
Koha/Patron/Modification.pm
api/v1/swagger/paths/patrons.yaml
koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
koha-tmpl/intranet-tmpl/prog/en/includes/patronfields.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
koha-tmpl/intranet-tmpl/prog/js/staff-global.js
koha-tmpl/opac-tmpl/bootstrap/en/includes/patron-title.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt
members/memberentry.pl
opac/opac-memberentry.pl
t/db_dependent/Koha/Patron.t
t/db_dependent/api/v1/patrons.t