From 3313f580154eb45ef7c90d0c70917817f34c3534 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 --- Koha/Patrons.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm index fd2b997583..d33fddfc63 100644 --- a/Koha/Patrons.pm +++ b/Koha/Patrons.pm @@ -141,7 +141,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