From: Jonathan Druart Date: Wed, 24 Oct 2018 14:51:12 +0000 (-0300) Subject: Bug 15766: Fix incorrect GROUP BY X-Git-Tag: v18.11.00~419 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=85da34c94a5a92df78e03a505054a241dc797877;p=koha_ffzg 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 Signed-off-by: Nick Clemens --- 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) {