From 0d77d3fbb1e64ea9522c3daab552bd70b4390364 Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Wed, 7 Feb 2018 12:26:53 -0300
Subject: [PATCH] Bug 20180: [sql_modes] Remove GROUP BY clause in
 manage-marc-import.pl

Replaced with a distinct.

Fix for:
'koha_kohadev.me.frameworktext' isn't in GROUP BY

t/db_dependent/www/search_utf8.t

NOTE: I added a [% frameworks.count %] into the template file,
      and compared master and a branch with this applied when
      managing a staged marc import. Values were identical.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
---
 tools/manage-marc-import.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl
index d503a5e0c8..4fea4005d7 100755
--- a/tools/manage-marc-import.pl
+++ b/tools/manage-marc-import.pl
@@ -62,7 +62,7 @@ my %cookies = parse CGI::Cookie($cookie);
 our $sessionID = $cookies{'CGISESSID'}->value;
 our $dbh = C4::Context->dbh;
 
-my $frameworks = Koha::BiblioFrameworks->search({ tagfield => { 'not' => undef } }, { join => 'marc_tag_structure', group_by=>'frameworkcode',order_by => ['frameworktext'] });
+my $frameworks = Koha::BiblioFrameworks->search({ tagfield => { 'not' => undef } }, { join => 'marc_tag_structure', distinct => 'frameworkcode', order_by => ['frameworktext'] });
 $template->param( frameworks => $frameworks );
 
 if ($op eq "create_labels") {
-- 
2.14.2