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>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit
dab4426457578094eb5aac6531d1a1db631d05c7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>