Bug 26090: Fix "item types" report
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 30 Jul 2020 12:16:09 +0000 (14:16 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 18 Aug 2020 12:38:41 +0000 (14:38 +0200)
commit5bca73080f89bb2f4ca83ce6ceb9fa8e3c4a7d92
treed2797e33f1ee4e48d27ae8143c2988356390d562
parent6d7ff0d5040ca9759fee0609a6b7108773b81357
Bug 26090: Fix "item types" report

This report was broken with SQL strict mode, but also without.

DBD::mysql::st execute failed: 'koha_kohadev.itemtypes.itemtype' isn't
in GROUP BY [for Statement "

and, if no library was selected:

DBD::mysql::st execute failed: Unknown column 'biblioitems.itemtype' in
'field list' [for Statement "

This patch does the minimum to make it usable, but it would need more
love.

Test plan:
To test you will need to try the 4 combinaisons:
 item-level_itypes = item or biblio
 With or without a library selected in the dropdown list

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
reports/itemtypes.plugin