From 84c59f0fbcc93886aaf6c131b649ac87c4b17d8a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 24 Oct 2018 11:51:12 -0300 Subject: [PATCH] Bug 15766: Fix incorrect GROUP BY 'koha_kohadev.creator_batches.description' isn't in GROUP BY Fix t/db_dependent/Creators/Lib.t if strict sql modes is on --- C4/Creators/Lib.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Creators/Lib.pm b/C4/Creators/Lib.pm index 68e6aa5930..c16a2c81a6 100644 --- a/C4/Creators/Lib.pm +++ b/C4/Creators/Lib.pm @@ -295,7 +295,7 @@ sub get_batch_summary { my @batches = (); $params->{fields} = ['batch_id', 'description', 'count(batch_id) as _item_count']; my ( $query, @where_args ) = _build_query( $params, 'creator_batches' ); - $query .= " GROUP BY batch_id"; + $query .= " GROUP BY batch_id, description"; my $sth = C4::Context->dbh->prepare($query); $sth->execute( @where_args ); if ($sth->err) { -- 2.11.0