From 93ab179566f96032c20d63ed3893e3251b1a333f Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Sun, 1 Mar 2026 21:03:21 +0000 Subject: [PATCH] Bug 41960: Add new systempreference 'OverduesBlockHolds' --- installer/data/mysql/atomicupdate/bug_41960.pl | 17 +++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../modules/admin/preferences/circulation.pref | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_41960.pl diff --git a/installer/data/mysql/atomicupdate/bug_41960.pl b/installer/data/mysql/atomicupdate/bug_41960.pl new file mode 100755 index 0000000000..7d443cde5a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41960.pl @@ -0,0 +1,17 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "41960", + description => "New systempreference 'OverduesBlockHolds'", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('OverduesBlockHolds','noblock','noblock|block','Should overdue items block the placement of a hold','Choice')} + ); + + say $out "Added new system preference 'OverduesBlockHolds'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 585d7a5d8d..2da9f118c5 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -622,6 +622,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OverdueNoticeCalendar','0',NULL,'Take the calendar into consideration when generating overdue notices','YesNo'), ('OverdueNoticeFrom', 'cron', 'cron|item-issuebranch|item-homebranch', 'Organize and send overdue notices by item home library or checkout library', 'Choice'), ('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'), +('OverduesBlockHolds','noblock','noblock|block','Should overdue items block the placement of a hold','Choice'), ('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'), ('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made available to XSLT sheets. Otherwise they will be removed.','YesNo'), ('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 29d80b0e20..7e528fecdb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -941,6 +941,12 @@ Circulation: pending: Pending intransit: In transit suspended: Suspended + - + - pref: OverduesBlockHolds + choices: + block: Block + noblock: "Don't block" + - "hold placement when the patron has overdue items." - - pref: ReservesNeedReturns choices: -- 2.39.5