Bugzilla – Attachment 139733 Details for
Bug 31112
Able to renew checkout when the number of holds exceeds available number of items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31112: (follow-up) Bring back the check for non-priority holds
Bug-31112-follow-up-Bring-back-the-check-for-non-p.patch (text/plain), 2.00 KB, created by
Kyle M Hall (khall)
on 2022-08-24 17:14:08 UTC
(
hide
)
Description:
Bug 31112: (follow-up) Bring back the check for non-priority holds
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-08-24 17:14:08 UTC
Size:
2.00 KB
patch
obsolete
>From dda1ac41fbe6a49235cd1e635fcbd7772c113057 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Mon, 22 Aug 2022 19:02:03 +0000 >Subject: [PATCH] Bug 31112: (follow-up) Bring back the check for non-priority > holds >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Before the changes from bug 31112 when CheckReserves returned a >non-priority hold we didn't return "on_reserve" status but checked in >addition to that whether there are any priority holds and if there >were, only then we returned the "on_reserve" error. > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Circulation.pm | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 606d83940b..125c0c2744 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2945,7 +2945,8 @@ sub CanBookBeRenewed { > } > } > >- if ( C4::Context->preference('AllowRenewalIfOtherItemsAvailable') && !Koha::Holds->search( { itemnumber => $itemnumber, found => undef } )->count() >+ my $biblio_has_holds = Koha::Holds->search({ biblionumber => $item->biblionumber, non_priority => 0 } )->count > 0; >+ if ( $biblio_has_holds && C4::Context->preference('AllowRenewalIfOtherItemsAvailable') && !Koha::Holds->search( { itemnumber => $itemnumber, found => undef } )->count() > ) > { > my $biblio = Koha::Biblios->find($item->biblionumber); >@@ -2987,9 +2988,9 @@ sub CanBookBeRenewed { > return ( 0, "on_reserve" ) unless $fillable; > } > >- } else { >+ } elsif ($biblio_has_holds) { > my ($status, $matched_reserve, $possible_reserves) = CheckReserves($itemnumber); >- return ( 0, "on_reserve" ) if $matched_reserve; >+ return ( 0, "on_reserve" ) if $status; > } > > return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'too_soon';#$auto_renew ne "no" && $auto_renew ne "ok"; >-- >2.30.2
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 31112
:
137826
|
137827
|
137828
|
137856
|
137857
|
137858
|
139492
|
139493
|
139494
|
139495
|
139622
|
139623
|
139729
|
139730
|
139731
|
139732
| 139733 |
139734
|
139735