Bug 15766: Fix incorrect GROUP BY
[srvgit] / C4 / Creators / Lib.pm
index 68e6aa5..c16a2c8 100644 (file)
@@ -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) {