From 9f396828afd9b6b806746dec1b3f321cb56c5815 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 9 Aug 2022 13:09:33 -0400 Subject: [PATCH] LP 1984114: Use Patron Preferred Name in SIP2 responses Use a patron's preferred first name, preferred second name, or preferred family name in SIP2 responses. If a preferred name field has no value, then the corresponding regular name field will be used. To test this patch, you can find a patron with a preferred name field set and look them up using a Patron Status Request message (23) via your favorite SIP2 client. Before applying the patch, the name field (AE) in the Patron Status Response message (24) will NOT use the patron's preferred name(s). After applying the patch and restarting Evergreen on the server, you repeat the previous Patron Status Request, and the response will now use the patron's preferred name(s) in the name field. Signed-off-by: Jason Stephenson Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm index 43824cf273..e7ba27ac48 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm @@ -249,9 +249,9 @@ sub name { sub format_name { my $u = shift; return sprintf('%s %s %s', - ($u->first_given_name || ''), - ($u->second_given_name || ''), - ($u->family_name || '')); + ($u->pref_first_given_name || $u->first_given_name || ''), + ($u->pref_second_given_name || $u->second_given_name || ''), + ($u->pref_family_name || $u->family_name || '')); } sub home_library { -- 2.11.0