]> git.koha-community.org Git - koha.git/commit
Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 23 Oct 2018 13:35:24 +0000 (10:35 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 6 Nov 2018 11:54:29 +0000 (11:54 +0000)
commit41f1cf664337602f6543642236b913eafab02711
tree206fed0497e493df2375ad068de8d0c57832f362
parent1107f15d9c2d2a4e7160f5cf5e3cb4a57c5dee7b
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>
tools/batchMod.pl