Bug 20179: [sql_modes] Remove GROUP BY in get_shelves_containing_record
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 6 Feb 2018 14:04:50 +0000 (11:04 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 9 Apr 2018 19:15:17 +0000 (16:15 -0300)
Replaced with distinct.
Fix for:
'koha_kohadev.me.shelfname' isn't in GROUP BY

t/db_dependent/Virtualshelves.t

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Virtualshelves.pm

index 195376c..bb7db67 100644 (file)
@@ -154,7 +154,7 @@ sub get_shelves_containing_record {
         },
         {
             join     => [ 'virtualshelfcontents', 'virtualshelfshares' ],
-            group_by => 'shelfnumber',
+            distinct => 'shelfnumber',
             order_by => { -asc => 'shelfname' },
         }
     );