From e8cbc3c57d91d6a79328ec7d70d43dd6865b5a27 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 Content-Type: text/plain; charset=utf-8 Signed-off-by: Michal Denar Signed-off-by: Josef Moravec Signed-off-by: Marcel de Rooy --- 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.11.0