From ce06b57df3733c39e29e0979d693af4cba27f0a7 Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Tue, 15 Apr 2025 16:04:10 -0300 Subject: [PATCH] Bug 32034: Add new syspref 'TransferLog' Signed-off-by: Tomas Cohen Arazi --- .../data/mysql/atomicupdate/bug_32034.pl | 20 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 3 ++- .../en/modules/admin/preferences/logs.pref | 6 ++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_32034.pl diff --git a/installer/data/mysql/atomicupdate/bug_32034.pl b/installer/data/mysql/atomicupdate/bug_32034.pl new file mode 100755 index 00000000000..7023744088d --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_32034.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "32034", + description => "Add library branch transfers to the action logs", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) + VALUES ('TransfersLog', '0', 'If enabled, log item transfer changes', '', 'YesNo') + } + ); + + say_success( $out, "Added new system preference 'TransfersLog'" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index f08d6e3448d..994008d6043 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -814,6 +814,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('TrackClicks','0',NULL,'Track links clicked','Integer'), ('TrackLastPatronActivityTriggers','',NULL,'If set, the field borrowers.lastseen will be updated everytime a patron performs a selected action','multiple'), ('TransfersBlockCirc','1',NULL,'Should the transfer modal block circulation staff from continuing scanning items','YesNo'), +('TransfersLog','0',NULL,'If enabled, log item transfer changes','YesNo'), ('TransfersMaxDaysWarning','3',NULL,'Define the days before a transfer is suspected of having a problem','Integer'), ('TransferWhenCancelAllWaitingHolds','0',NULL,'Transfer items when cancelling all waiting holds','YesNo'), ('TranslateNotices','0',NULL, 'Allow notices to be translated','YesNo'), @@ -878,4 +879,4 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), ('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), ('z3950Status','','','This syspref allows to define custom YAML based rules for marking items unavailable in z3950 results.','Textarea') -; \ No newline at end of file +; 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 8b0231098a9..46100bb836a 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 @@ -120,6 +120,12 @@ Logging: 1: Log 0: "Don't log" - any changes to purchase suggestions (create, modify, delete). + - + - pref: TransfersLog + choices: + 1: Log + 0: "Don't log" + - item transfers. Debugging: - -- 2.49.0