[Koha-bugs] [Bug 24030] GetItemsForInventory failing with "ORDER BY clause is not in SELECT list"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 13 14:25:54 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24030

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #95357|0                           |1
        is obsolete|                            |

--- Comment #5 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 95378
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95378&action=edit
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 at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list