Bugzilla – Attachment 163706 Details for
Bug 36331
Items that cannot be held are prevented renewal when there are holds on the record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36331: (follow-up) Ignore non_priority holds when checking renewability
Bug-36331-follow-up-Ignore-nonpriority-holds-when-.patch (text/plain), 1.94 KB, created by
Nick Clemens (kidclamp)
on 2024-03-22 13:55:41 UTC
(
hide
)
Description:
Bug 36331: (follow-up) Ignore non_priority holds when checking renewability
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-03-22 13:55:41 UTC
Size:
1.94 KB
patch
obsolete
>From 23152d1c160f77d362b0aa50a93a76714c63fddf Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 22 Mar 2024 13:54:03 +0000 >Subject: [PATCH] Bug 36331: (follow-up) Ignore non_priority holds when > checking renewability > >When changing the fetch of holds, the check for non-priority was lost - added a loop to pull those out >so the totals and checks are correct >--- > C4/Circulation.pm | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e768d442e7a..23632cad73c 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3054,8 +3054,12 @@ sub CanBookBeRenewed { > if ( $item->current_holds->search( { non_priority => 0 } )->count ); > > >- my ($status, $matched_reserve, $fillable_holds) = CheckReserves($item); >- if ( $fillable_holds ) { >+ my ($status, $matched_reserve, $possible_holds) = CheckReserves($item); >+ my @fillable_holds = (); >+ foreach my $possible_hold ( @{$possible_holds} ) { >+ push @fillable_holds, $possible_hold unless $possible_hold->{non_priority}; >+ } >+ if ( @fillable_holds ) { > if ( C4::Context->preference('AllowRenewalIfOtherItemsAvailable') ) { > > # Get all other items that could possibly fill reserves >@@ -3066,10 +3070,10 @@ sub CanBookBeRenewed { > notforloan => 0, > -not => { itemnumber => $item->itemnumber } })->as_list; > >- return ( 0, "on_reserve" ) if @{$fillable_holds} && (scalar @other_items < scalar @{$fillable_holds} ); >+ return ( 0, "on_reserve" ) if @fillable_holds && (scalar @other_items < scalar @fillable_holds ); > > my %matched_items; >- foreach my $possible_hold ( @{$fillable_holds} ) { >+ foreach my $possible_hold ( @fillable_holds ) { > my $fillable = 0; > my $patron_with_reserve = Koha::Patrons->find($possible_hold->{borrowernumber}); > >-- >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 36331
:
163236
|
163254
|
163673
|
163706
|
163707