From 186ec335db5e39c9836b7a429726af91c7f93093 Mon Sep 17 00:00:00 2001 From: Andrew Fuerste Henry Date: Fri, 8 May 2026 19:51:37 +0000 Subject: [PATCH] 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 Signed-off-by: David Cook Signed-off-by: Lucas Gass --- opac/opac-main.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-main.pl b/opac/opac-main.pl index 494376d111..a1f4f0869f 100755 --- a/opac/opac-main.pl +++ b/opac/opac-main.pl @@ -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( {