@@ -, +, @@ --- installer/data/mysql/atomicupdate/bug_22866.pl | 15 +++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/circulation.pref | 6 ++++++ svc/renew | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_22866.pl --- a/installer/data/mysql/atomicupdate/bug_22866.pl +++ a/installer/data/mysql/atomicupdate/bug_22866.pl @@ -0,0 +1,15 @@ +use Modern::Perl; + +return { + bug_number => "22866", + description => "Add new syspref AllowRenewalItemsDeniedOverride", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES + ('AllowRenewalItemsDeniedOverride','0','','If ON, allow items on hold to be renewed by staff even if disallowed by ItemsDeniedRenewal','YesNo'); + }); + }, +} --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -44,6 +44,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AllowRenewalIfOtherItemsAvailable','0',NULL,'If enabled, allow a patron to renew an item with unfilled holds if other available items can fill that hold.','YesNo'), ('AllowRenewalLimitOverride','0',NULL,'if ON, allows renewal limits to be overridden on the circulation screen','YesNo'), ('AllowRenewalOnHoldOverride','0',NULL,'If ON, allow items on hold to be renewed with a specified due date','YesNo'), +('AllowRenewalItemsDeniedOverride','0',NULL,'If ON, allow items on hold to be renewed by staff even if disallowed by ItemsDeniedRenewal','YesNo'), ('AllowReturnToBranch','anywhere','anywhere|homebranch|holdingbranch|homeorholdingbranch','Where an item may be returned','Choice'), ('AllowStaffToSetCheckoutsVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s checkouts to be visible to linked patrons from the opac.', 'YesNo'), ('AllowStaffToSetFinesVisibilityForGuarantor','0',NULL,'If enabled, library staff can set a patron''s fines to be visible to linked patrons from the opac.', 'YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -212,6 +212,12 @@ Circulation: 1: Allow 0: "Don't allow" - staff to renew items that are on hold by manually specifying a due date. + - + - pref: AllowRenewalItemsDeniedOverride + choices: + 1: Allow + 0: "Don't allow" + - staff to renew items that should not be renewable because they have a match in ItemsDeniedRenewal. - - pref: AllowItemsOnHoldCheckoutSIP choices: --- a/svc/renew +++ a/svc/renew @@ -69,7 +69,7 @@ my $override = $override ||= $data->{error} && $data->{error} eq 'item_denied_renewal' - && C4::Context->preference('AllowRenewalLimitOverride'); + && C4::Context->preference('AllowRenewalItemsDeniedOverride'); # If we're allowing reserved items to be renewed... if ( $override ) { --