From 11d1b16bd995ea7b586f8421422069326f33d080 Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Wed, 23 Oct 2024 13:27:52 +0000 Subject: [PATCH] Bug 38239: Incorrect number of items to pull (in Holds to pull) with partially filled holds With a over-sufficient number of items, when more than one patron has placed hold, and the holds have been partially filled (checked-in = waiting for pick up), the number of items to pull in the Holds to pull table shows the total number of holds, including those waiting. This erroneously suggests to the librarian to pull an excessive number of items from the shelves. Test plan: ========== 1. For a bibliographic record with more than two items (in ktd, e.g. "Lanark a life in four books"), place hold for two patrons. 2. On the Holds to pull page control that there are two items to pull. 3. As a librarian from the library of one of the patrons, Check-in one item. 4. Note that in Holds to pull table you still see two items to pull, which is misleading. 5. Apply the patch; restart_all. 6. Now you should see only one item to be pulled. Sponsored-by: Ignatianum University in Cracow --- circ/pendingreserves.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 366d0009af..b85cf5c90e 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -194,7 +194,7 @@ if ( $holds->count ) { # patrons count per biblio my $patrons_count = { map { $_->{biblionumber} => $_->{patrons_count} } @{ Koha::Holds->search( - { 'suspend' => 0 }, + { 'suspend' => 0, 'found' => undef }, { select => [ 'biblionumber', { count => { distinct => 'borrowernumber' } } ], as => [qw( biblionumber patrons_count )], -- 2.39.5