Bugzilla – Attachment 137723 Details for
Bug 29102
DecreaseLoanHighHolds will decrease loan period if patron has an 'unfound' hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29102: Remove ignore_found_holds
Bug-29102-Remove-ignorefoundholds.patch (text/plain), 2.67 KB, created by
Nick Clemens (kidclamp)
on 2022-07-14 14:26:47 UTC
(
hide
)
Description:
Bug 29102: Remove ignore_found_holds
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-07-14 14:26:47 UTC
Size:
2.67 KB
patch
obsolete
>From 0f6275d6fc1bcf109d86719c9dcad9ecaf2377b6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 23 Dec 2021 17:16:12 +0000 >Subject: [PATCH] Bug 29102: Remove ignore_found_holds > >If not counting patrons holds, found or unfound, we no longer need this option >introduced by bug 28078 >--- > C4/Reserves.pm | 6 +----- > t/db_dependent/Reserves/MultiplePerRecord.t | 5 +---- > 2 files changed, 2 insertions(+), 9 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 9a1a7fc758..4f489ed584 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -402,11 +402,8 @@ sub CanBookBeReserved{ > if ($canReserve->{status} eq 'OK') { #We can reserve this Item! } > > current params are: >- 'ignore_found_holds' - if true holds that have been trapped are not counted >- toward the patron limit, used by checkHighHolds to avoid counting the hold we will fill with the >- current checkout against the high holds threshold > 'ignore_hold_counts' - we use this routine to check if an item can fill a hold - on this case we >- should not check if there are too many holds as we only csre about reservability >+ should not check if there are too many holds as we only care about reservability > > @RETURNS { status => OK }, if the Item can be reserved. > { status => ageRestricted }, if the Item is age restricted for this borrower. >@@ -519,7 +516,6 @@ sub CanItemBeReserved { > borrowernumber => $patron->borrowernumber, > biblionumber => $item->biblionumber, > }; >- $search_params->{found} = undef if $params->{ignore_found_holds}; > my $holds = Koha::Holds->search($search_params); > return { status => "tooManyHoldsForThisRecord", limit => $holds_per_record } if $holds->count() >= $holds_per_record; > } >diff --git a/t/db_dependent/Reserves/MultiplePerRecord.t b/t/db_dependent/Reserves/MultiplePerRecord.t >index 07f7ea9aba..bd15b7be19 100755 >--- a/t/db_dependent/Reserves/MultiplePerRecord.t >+++ b/t/db_dependent/Reserves/MultiplePerRecord.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 16; >+use Test::More tests => 15; > use t::lib::TestBuilder; > use t::lib::Mocks; > >@@ -251,7 +251,4 @@ Koha::Holds->find($hold_id)->found("W")->store; > $can = CanBookBeReserved($patron->{borrowernumber}, $biblio->biblionumber); > is( $can->{status}, 'tooManyHoldsForThisRecord', 'Third hold exceeds limit of holds per record' ); > >-$can = CanBookBeReserved($patron->{borrowernumber}, $biblio->biblionumber, undef, { ignore_found_holds => 1 }); >-is( $can->{status}, 'OK', 'Third hold is allowed when ignoring waiting holds' ); >- > $schema->storage->txn_rollback; >-- >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 29102
:
128901
|
128902
|
128903
|
137722
|
137723
|
137745
|
137746
|
140970
|
140971
|
142990
|
142991