Bug 40245: Add new system preference ShowPatronFirstnameIfDifferentThanPreferredname

Adds a new system preference ShowPatronFirstnameIfDifferentThanPreferredname
	to allow a patron's firstname to be shown in search results when
	different than their preferred name.

Sponsored-by: Westlake Porter Public Library <https://westlakelibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
CJ Lynce 2025-10-13 21:51:06 +00:00 committed by Lucas Gass
parent b0656241de
commit 1d6eb51d20
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,20 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);
return {
bug_number => "40425",
description => "Add a system preference ShowPatronFirstnameIfDifferentThanPreferredname",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(
q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('ShowPatronFirstnameIfDifferentThanPreferredname','0',NULL,'If ON, a patrons firstname will also show in search results if different than their preferred name','YesNo')
}
);
say $out "Added new system preference 'ShowPatronFirstnameIfDifferentThanPreferredname'";
},
};

View File

@ -750,6 +750,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('ShowHeadingUse', '0', NULL, 'Show whether MARC21 authority record contains an established heading that conforms to descriptive cataloguing rules, and can therefore be used as a main/added entry, or subject, or series title', 'YesNo'),
('showLastPatron','0','','If ON, enables the last patron feature in the intranet','YesNo'),
('showLastPatronCount', '10', '', 'How many patrons should showLastPatron remember', 'Integer'),
('ShowPatronFirstnameIfDifferentThanPreferredname','0','','If ON, a patrons firstname will also show in search results if different than their preferred name','YesNo'),
('ShowPatronImageInWebBasedSelfCheck','0','','If ON, displays patron image when a patron uses web-based self-checkout','YesNo'),
('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'),
('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'),

View File

@ -138,6 +138,12 @@ Patrons:
class: integer
- days. Leave empty to disable this behavior.
- "<br><strong>NOTE:</strong> This system preference requires the misc/cronjobs/cleanup_database.pl cronjob. Ask your system administrator to schedule it."
-
- pref: ShowPatronFirstnameIfDifferentThanPreferredname
choices:
1: Show
0: "Don't show"
- "a patron's firstname in search results if their preferred name is different."
Membership expiry:
-