From eac8f7d9ac11e6a20d0e3ecf0986edb9a270415f 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 Signed-off-by: Jonathan Druart --- 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.39.5