Bugzilla – Attachment 124277 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: Allow override of renewals denied by ItemsDeniedRenewal
Bug-22866-Allow-override-of-renewals-denied-by-Ite.patch (text/plain), 1.82 KB, created by
Andrew Fuerste-Henry
on 2021-08-31 12:23:34 UTC
(
hide
)
Description:
Bug 22866: Allow override of renewals denied by ItemsDeniedRenewal
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-08-31 12:23:34 UTC
Size:
1.82 KB
patch
obsolete
>From 2926c17c7ba6fb865596381338ec8c049b0bb367 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 31 Aug 2021 07:37:43 -0400 >Subject: [PATCH] Bug 22866: Allow override of renewals denied by > ItemsDeniedRenewal > >Test Plan: >1) Create a circ rule for patron category Y and itemtype X >2) Block renewal of itemtype X using ItemsDeniedRenewal >3) Confirm AllowRenewalLimitOverride is set to Allow >4) Check item of itemtype X out to patron of category Y >5) See that circulation.pl shows "renewal denied by syspref" >6) Click the checkbox for "Override renewal limit" >7) See that "renewal denied by syspref" message is replaced by a checkbox suggesting renewal will be allowed >8) Attempt to renew item >9) See error "Renew failed: item_denied_renewal" >10) Apply this patch >11) Restart all the things! >12) Attempt to renew the item via override again >13) The renewal is a success! > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > svc/renew | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/svc/renew b/svc/renew >index a3edd4db43..39f3d3d5be 100755 >--- a/svc/renew >+++ b/svc/renew >@@ -61,8 +61,18 @@ $data->{branchcode} = $branchcode; > ( $data->{renew_okay}, $data->{error} ) = > CanBookBeRenewed( $borrowernumber, $itemnumber, $override_limit ); > >+my $override = >+ $data->{error} >+ && $data->{error} eq 'on_reserve' >+ && C4::Context->preference('AllowRenewalOnHoldOverride'); >+ >+$override ||= >+ $data->{error} >+ && $data->{error} eq 'item_denied_renewal' >+ && C4::Context->preference('AllowRenewalLimitOverride'); >+ > # If we're allowing reserved items to be renewed... >-if ( $data->{error} && $data->{error} eq 'on_reserve' && C4::Context->preference('AllowRenewalOnHoldOverride')) { >+if ( $override ) { > $data->{renew_okay} = 1; > $data->{error} = undef; > } >-- >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