Bugzilla – Attachment 126751 Details for
Bug 22866
ItemsDeniedRenewal cannot be overriden
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22866: Add syspref
Bug-22866-Add-syspref.patch (text/plain), 4.00 KB, created by
Nick Clemens (kidclamp)
on 2021-10-22 11:58:23 UTC
(
hide
)
Description:
Bug 22866: Add syspref
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-10-22 11:58:23 UTC
Size:
4.00 KB
patch
obsolete
>From 57571bc4b156ffd35f80d58f65cc3a88e720b9fd Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 1 Sep 2021 08:24:04 -0400 >Subject: [PATCH] Bug 22866: Add syspref > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > 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 > >diff --git a/installer/data/mysql/atomicupdate/bug_22866.pl b/installer/data/mysql/atomicupdate/bug_22866.pl >new file mode 100755 >index 0000000000..e93cc8d545 >--- /dev/null >+++ b/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'); >+ }); >+ }, >+} >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index dd2f184931..592edf96ab 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -42,6 +42,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'), >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 6c2a33bc6c..0c83e1649c 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 >@@ -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: >diff --git a/svc/renew b/svc/renew >index 7b6ac5a9cc..2273f32d43 100755 >--- a/svc/renew >+++ b/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 ) { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22866
:
124272
|
124273
|
124277
|
124312
|
124324
|
126750
| 126751 |
128709