[Koha-bugs] [Bug 21635] Incorrect GROUP BY clause in batchMod.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 23 15:37:21 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21635

--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 81025
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81025&action=edit
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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list