The catalog by itemtype report (reports/manager.pl?report_name=itemtypes) returns no results if SQL strict mode is on.
Created attachment 107581 [details] [review] 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
Created attachment 108053 [details] [review] 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>
Created attachment 108180 [details] [review] 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>
The fix works as expected and passes QA scripts.. as a major I think lets get this in as is and we can followup later with more of a cleanup patch. Passing QA
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.04
backported to 19.11.x for 19.11.10
Backported to 19.05.x branch for 19.05.15