Bug 21621 - Incorrect GROUP BY in tools/letter.pl
Summary: Incorrect GROUP BY in tools/letter.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 17258 22002
  Show dependency treegraph
 
Reported: 2018-10-19 15:04 UTC by Jonathan Druart
Modified: 2020-01-06 20:17 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl (1.29 KB, patch)
2018-10-19 15:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl (1.36 KB, patch)
2018-10-19 18:13 UTC, Pierre-Marc Thibault
Details | Diff | Splinter Review
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl (1.42 KB, patch)
2018-10-27 20:31 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2018-10-19 15:04:01 UTC
DBD::mysql::db selectall_arrayref failed: 'koha_kohadev.letter.name' isn't in GROUP BY [for Statement "SELECT branchcode, module, code, name, branchname
            FROM letter
            LEFT OUTER JOIN branches USING (branchcode)
     GROUP BY branchcode,module,code ORDER BY module, code, branchcode"] at /home/vagrant/kohaclone/tools/letter.pl line 383.
Comment 1 Jonathan Druart 2018-10-19 15:09:01 UTC
Created attachment 80942 [details] [review]
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl

Fix:
  'koha_kohadev.letter.name' isn't in GROUP BY

DBD::mysql::db selectall_arrayref failed: 'koha_kohadev.letter.name' isn't in GROUP BY [for Statement "SELECT branchcode, module, code, name, branchname
            FROM letter
            LEFT OUTER JOIN branches USING (branchcode)
     GROUP BY branchcode,module,code ORDER BY module, code, branchcode"] at /home/vagrant/kohaclone/tools/letter.pl line 383.

Test plan:
- Copy some default notice templates for specific libraries
- List the different notice templates
- Confirm that notices appear only one, with "all libraries" you will see all
Comment 2 Pierre-Marc Thibault 2018-10-19 18:13:11 UTC
Created attachment 80949 [details] [review]
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl

Fix:
  'koha_kohadev.letter.name' isn't in GROUP BY

DBD::mysql::db selectall_arrayref failed: 'koha_kohadev.letter.name' isn't in GROUP BY [for Statement "SELECT branchcode, module, code, name, branchname
            FROM letter
            LEFT OUTER JOIN branches USING (branchcode)
     GROUP BY branchcode,module,code ORDER BY module, code, branchcode"] at /home/vagrant/kohaclone/tools/letter.pl line 383.

Test plan:
- Copy some default notice templates for specific libraries
- List the different notice templates
- Confirm that notices appear only one, with "all libraries" you will see all

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Comment 3 Katrin Fischer 2018-10-27 20:31:18 UTC
Created attachment 81366 [details] [review]
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl

Fix:
  'koha_kohadev.letter.name' isn't in GROUP BY

DBD::mysql::db selectall_arrayref failed: 'koha_kohadev.letter.name' isn't in GROUP BY [for Statement "SELECT branchcode, module, code, name, branchname
            FROM letter
            LEFT OUTER JOIN branches USING (branchcode)
     GROUP BY branchcode,module,code ORDER BY module, code, branchcode"] at /home/vagrant/kohaclone/tools/letter.pl line 383.

Test plan:
- Copy some default notice templates for specific libraries
- List the different notice templates
- Confirm that notices appear only one, with "all libraries" you will see all

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Nick Clemens (kidclamp) 2018-10-29 01:18:43 UTC
Awesome work all!

Pushed to master for 18.11
Comment 5 Martin Renvoize (ashimema) 2018-11-08 15:35:39 UTC
Pushed to 18.05.x for 18.05.06
Comment 6 Fridolin Somers 2018-11-28 10:46:44 UTC
I pass for sql modes in 17.11.x