Summary: | Incorrect GROUP BY clause in batchMod.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, m.de.rooy, martin.renvoize, nick |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 17258, 22022 | ||
Attachments: |
Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl
Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl |
Description
Jonathan Druart
2018-10-23 13:34:43 UTC
Created attachment 81025 [details] [review] Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl batchMod.pl: DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_val ue' isn't in GROUP BY [for Statement "SELECT authorised_value, lib FROM authorised_values LEFT JOIN authorised_values_branches ON ( id = av_id ) WHERE category = ? AND ( branchcode = ? OR branchcode IS NULL ) GROUP BY lib ORDER BY lib, lib_opac" with ParamValues: 0='WITHDRAWN', 1="CPL"] at /home/vagrant/kohaclone/tools/batchMod.pl line 396. We must use Koha::AuthorisedValues->search instead of a raw SQL query. Test plan: Edit some items in a batch Confirm that the dropdown list (AV) are correctly filled We will lose speed efficiency here, but better to be consistent, then cache AV in Koha::AuthorisedValues Created attachment 81147 [details] [review] Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl batchMod.pl: DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_val ue' isn't in GROUP BY [for Statement "SELECT authorised_value, lib FROM authorised_values LEFT JOIN authorised_values_branches ON ( id = av_id ) WHERE category = ? AND ( branchcode = ? OR branchcode IS NULL ) GROUP BY lib ORDER BY lib, lib_opac" with ParamValues: 0='WITHDRAWN', 1="CPL"] at /home/vagrant/kohaclone/tools/batchMod.pl line 396. We must use Koha::AuthorisedValues->search instead of a raw SQL query. Test plan: Edit some items in a batch Confirm that the dropdown list (AV) are correctly filled We will lose speed efficiency here, but better to be consistent, then cache AV in Koha::AuthorisedValues Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Created attachment 81260 [details] [review] Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl batchMod.pl: DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_val ue' isn't in GROUP BY [for Statement "SELECT authorised_value, lib FROM authorised_values LEFT JOIN authorised_values_branches ON ( id = av_id ) WHERE category = ? AND ( branchcode = ? OR branchcode IS NULL ) GROUP BY lib ORDER BY lib, lib_opac" with ParamValues: 0='WITHDRAWN', 1="CPL"] at /home/vagrant/kohaclone/tools/batchMod.pl line 396. We must use Koha::AuthorisedValues->search instead of a raw SQL query. Test plan: Edit some items in a batch Confirm that the dropdown list (AV) are correctly filled We will lose speed efficiency here, but better to be consistent, then cache AV in Koha::AuthorisedValues Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Awesome work all! Pushed to master for 18.11 Pushed to 18.05.x for 18.05.06 I pass for sql modes in 17.11.x |