Bugzilla – Attachment 124324 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), 3.96 KB, created by
Kyle M Hall
on 2021-09-01 12:24:26 UTC
(
hide
)
Description:
Bug 22866: Add syspref
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2021-09-01 12:24:26 UTC
Size:
3.96 KB
patch
obsolete
>From d6af04a9ceb72595aeefc81fc281bc9afb4e4041 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 > >--- > 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 59db857ca6..78144b38d2 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/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'), >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 fc07ec1ed6..9037221d4b 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 39f3d3d5be..ff02cc6935 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.30.1 (Apple Git-130)
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