Bugzilla – Attachment 124312 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.88 KB, created by
Andrew Fuerste-Henry
on 2021-08-31 17:35:05 UTC
(
hide
)
Description:
Bug 22866: Allow override of renewals denied by ItemsDeniedRenewal
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-08-31 17:35:05 UTC
Size:
1.88 KB
patch
obsolete
>From 59c0a0d41b924e5c66462c7d6519201a0f6e1ed7 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> > >Signed-off-by: Esther Melander <estherm@sodaspringsid.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