From 83944dc2327d2c0e97dff9ba646bbe4f837305c5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 18 Nov 2020 10:36:40 +0100 Subject: [PATCH] Bug 24488: Fix count distinct patron on a given hold Signed-off-by: Michal Denar Signed-off-by: Josef Moravec Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- circ/pendingreserves.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 68e57a090b..d9a5107e74 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -256,7 +256,7 @@ foreach my $bibnum ( @biblionumbers ){ # patrons with holds my $patrons_count = Koha::Holds->search( { biblionumber => $bibnum }, - { select => [ { distinct => 'borrowernumber' } ] } + { distinct => 1, columns => qw(me.borrowernumber) } )->count; $reserves->{$bibnum}->{patrons_count} = $patrons_count; -- 2.39.5