From 7d325208a7c639efd76cc6ca98f33cb6d1c98e28 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Feb 2018 17:06:55 -0300 Subject: [PATCH] Bug 20182: [sql_modes] Remove group by clause in search_patrons_to_anonymise Not trivial, more attention needed on this one! Fix for: 'koha_kohadev.me.cardnumber' isn't in GROUP BY Looks like the query is complexified, perf tests needed, see bug 19599. Signed-off-by: Josef Moravec Signed-off-by: Julian Maurice --- Koha/Patrons.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm index fe8dd524a1..1e37159d5a 100644 --- a/Koha/Patrons.pm +++ b/Koha/Patrons.pm @@ -162,7 +162,7 @@ sub search_patrons_to_anonymise { ( $library ? ( 'old_issues.branchcode' => $library ) : () ), }, { join => ["old_issues"], - group_by => 'borrowernumber' + distinct => 1, } ); return Koha::Patrons->_new_from_dbic($rs); -- 2.14.2