From 6458ed7400a2d2b31f10707a65377b895e67f02e Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Wed, 15 Oct 2025 15:16:06 +0300 Subject: [PATCH] Bug 25673: Add new system preference BorrowersViewLog --- installer/data/mysql/atomicupdate/bug_25673.pl | 18 ++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/logs.pref | 6 ++++++ 3 files changed, 25 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_25673.pl diff --git a/installer/data/mysql/atomicupdate/bug_25673.pl b/installer/data/mysql/atomicupdate/bug_25673.pl new file mode 100644 index 00000000000..bdb2e1c7514 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_25673.pl @@ -0,0 +1,18 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "25673", + description => "Add preference BorrowersViewLog", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('BorrowersViewLog','0',NULL,'If enabled, log when patron data is viewed','YesNo')} + ); + + say_success( $out, "Added new system preference 'BorrowersViewLog'" ); + + }, +}; \ No newline at end of file diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 0d77d5ba947..844e33b68f7 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -132,6 +132,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('BorrowerRenewalPeriodBase','now','dateexpiry|now|combination','Set whether the borrower renewal date should be counted from the dateexpiry, from the current date or by combination: if the dateexpiry is in future use dateexpiry, else use current date ','Choice'), ('BorrowersLog','1',NULL,'If ON, log edit/create/delete actions on patron data','YesNo'), ('BorrowersTitles','Mr|Mrs|Miss|Ms',NULL,'Define appropriate Titles for patrons','free'), +('BorrowersViewLog','0',NULL,'If enabled, log when patron data is viewed','YesNo'), ('BorrowerUnwantedField','',NULL,'Name the fields you don\'t need to store for a patron\'s account','free'), ('BranchTransferLimitsType','ccode','itemtype|ccode','When using branch transfer limits, choose whether to limit by itemtype or collection code.','Choice'), ('BrowseResultSelection','0',NULL,'Enable/Disable browsing search results fromt the bibliographic record detail page in staff interface','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref index 58679b4ab32..e7905cb17fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref @@ -12,6 +12,12 @@ Logging: 1: Log 0: "Don't log" - changes to patron records and patron restrictions. + - + - pref: BorrowersViewLog + choices: + 1: Log + 0: "Don't log" + - when patron data is viewed. - - pref: CardnumberLog choices: -- 2.34.1