Bug 42570: Use count_holds for OPAC patron summary pending holds

To test:
1 - enable DisplayAddHoldGroups
2 - place two ungrouped holds for a patron
3 - log into the opac as your patron, see 2 pending holds
3 - group the two holds
4 - reload OPAC, still see 2 pending holds
5 - Apply patch, restart_all
6 - reload OPAc, see 1 pending holds
7 - ungroup holds
8 - reload OPAC, see 2 pending holds

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 186ec335db)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This commit is contained in:
Andrew Fuerste Henry 2026-05-08 19:51:37 +00:00 committed by Jacob O'Mara
parent 5ca8f35a10
commit cce8bf77f6
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ my $patron = Koha::Patrons->find($borrowernumber);
if ($patron) {
my $checkouts = Koha::Checkouts->search( { borrowernumber => $borrowernumber } )->count;
my ( $overdues_count, $overdues ) = checkoverdues($borrowernumber);
my $holds_pending = Koha::Holds->search( { borrowernumber => $borrowernumber, found => undef } )->count;
my $holds_pending = Koha::Holds->count_holds( { borrowernumber => $borrowernumber, found => undef } );
my $holds_waiting = Koha::Holds->search( { borrowernumber => $borrowernumber } )->waiting->count;
my $patron_messages = Koha::Patron::Messages->search(
{