t/db_dependent/Items/GetItemsForInventory.t .. 1/9 DBD::mysql::st execute failed: Expression #1 of ORDER BY clause is not in SELECT list, references column 'koha_kohadev.items.cn_sort' which is not in SELECT list; this is incompatible with DISTINCT [for Statement " SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber FROM items LEFT JOIN biblio ON items.biblionumber = biblio.biblionumber LEFT JOIN biblioitems on items.biblionumber = biblioitems.biblionumber ORDER BY items.cn_sort, itemcallnumber, title"] at /kohadevbox/koha/C4/Items.pm line 838.
Created attachment 95356 [details] [review] Bug 24030: Remove OldWay comparaison from GetItemsForInventory.t This has been introduced to make sure there were no regression at a given point. But now we are fixing the "old way" so it does not make sense to keep it any longer
Created attachment 95357 [details] [review] Bug 24030: Fix GetItemsForInventory under MySQL 8 t/db_dependent/Items/GetItemsForInventory.t .. 1/9 DBD::mysql::st execute failed: Expression #1 of ORDER BY clause is not in SELECT list, references column 'koha_kohadev.items.cn_sort' which is not in SELECT list; this is incompatible with DISTINCT [for Statement " SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber FROM items LEFT JOIN biblio ON items.biblionumber = biblio.biblionumber LEFT JOIN biblioitems on items.biblionumber = biblioitems.biblionumber ORDER BY items.cn_sort, itemcallnumber, title"] at /kohadevbox/koha/C4/Items.pm line 838. We simply follow what the error says, and add items.cn_sort to the SELECT list
Good catch, obvious corrections. Passing QA and Pushing.
Created attachment 95377 [details] [review] Bug 24030: Remove OldWay comparaison from GetItemsForInventory.t This has been introduced to make sure there were no regression at a given point. But now we are fixing the "old way" so it does not make sense to keep it any longer Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 95378 [details] [review] Bug 24030: Fix GetItemsForInventory under MySQL 8 t/db_dependent/Items/GetItemsForInventory.t .. 1/9 DBD::mysql::st execute failed: Expression #1 of ORDER BY clause is not in SELECT list, references column 'koha_kohadev.items.cn_sort' which is not in SELECT list; this is incompatible with DISTINCT [for Statement " SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber FROM items LEFT JOIN biblio ON items.biblionumber = biblio.biblionumber LEFT JOIN biblioitems on items.biblionumber = biblioitems.biblionumber ORDER BY items.cn_sort, itemcallnumber, title"] at /kohadevbox/koha/C4/Items.pm line 838. We simply follow what the error says, and add items.cn_sort to the SELECT list Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice work! Pushed to master for 19.11.00