Bug 32478: Fix handling of undef values in ItemsDeniedRenewal

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
David Gustafsson 2023-05-04 17:51:44 +02:00 committed by Tomas Cohen Arazi
parent e9738a8370
commit dc35755238
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 19 additions and 2 deletions

View file

@ -0,0 +1,17 @@
use Modern::Perl;
use C4::Context;
return {
bug_number => "32478",
description => "Remove usage of Koha::Config::SysPref->find since bypasses cache",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{UPDATE `systempreferences` SET `value` = REPLACE(`value`, 'NULL', 'null') WHERE `variable` = 'ItemsDeniedRenewal'});
say $out "Replace 'NULL' with 'null' in ItemsDeniedRenewal system preference";
C4::Context->clear_syspref_cache();
say $out "Clear system preference cache";
},
};

View file

@ -540,9 +540,9 @@ Circulation:
- "<br />Can name any field in the items table followed by a colon then a space then"
- "a bracketed list of values separated by commas."
- "For example:"
- "<br />ccode: [NEWFIC,NULL,DVD]"
- "<br />ccode: [NEWFIC,null,DVD]"
- "<br />itype: [NEWBK,\"\"]"
- "<br /> <strong>NOTE:</strong> The word 'NULL' can be used to block renewal on undefined fields, while an empty string \"\" will block on an empty (but defined) field."
- "<br /> <strong>NOTE:</strong> The word 'null' can be used to block renewal on undefined fields, while an empty string \"\" will block on an empty (but defined) field."
-
- pref: UpdateNotForLoanStatusOnCheckout
type: textarea