Bug 26020 - Holds to pull report is broken in sql strict mode
Summary: Holds to pull report is broken in sql strict mode
Status: RESOLVED DUPLICATE of bug 22431
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-18 16:59 UTC by Katrin Fischer
Modified: 2020-07-23 06:43 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-07-18 16:59:23 UTC
There is no error on the page, but it remains empty, even while holds queue shows you holds. The logs reveal:


DBD::mysql::st execute failed: 'koha_kohadev.reserves.reserve_id' isn't in GROUP BY [for Statement "SELECT min(reservedate) as l_reservedate,
            reserves.reserve_id,
            reserves.borrowernumber as borrowernumber,

            GROUP_CONCAT(DISTINCT items.holdingbranch 
                    ORDER BY items.itemnumber SEPARATOR '|') l_holdingbranch,
            reserves.biblionumber,
            reserves.branchcode as l_branch,
            reserves.itemnumber,
            items.holdingbranch,
            items.homebranch,
            GROUP_CONCAT(DISTINCT items.itype
                    ORDER BY items.itemnumber SEPARATOR '|') l_item_type,
            GROUP_CONCAT(DISTINCT items.location 
                    ORDER BY items.itemnumber SEPARATOR '|') l_location,
            GROUP_CONCAT(DISTINCT items.itemcallnumber 
                    ORDER BY items.itemnumber SEPARATOR '|') l_itemcallnumber,
            GROUP_CONCAT(DISTINCT items.enumchron
                    ORDER BY items.itemnumber SEPARATOR '|') l_enumchron,
            GROUP_CONCAT(DISTINCT items.copynumber
                    ORDER BY items.itemnumber SEPARATOR '|') l_copynumber,
            biblio.title,
            biblio.subtitle,
            biblio.medium,
            biblio.part_number,
            biblio.part_name,
            biblio.author,
            biblioitems.editionstatement,
            count(DISTINCT items.itemnumber) as icount,
            count(DISTINCT reserves.borrowernumber) as rcount,
            borrowers.firstname,
            borrowers.surname
    FROM  reserves
        LEFT JOIN items ON items.biblionumber=reserves.biblionumber 
        LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber
        LEFT JOIN biblioitems ON biblio.biblionumber=biblioitems.biblionumber
        LEFT JOIN branchtransfers ON items.itemnumber=branchtransfers.itemnumber
        LEFT JOIN issues ON items.itemnumber=issues.itemnumber
        LEFT JOIN borrowers ON reserves.borrowernumber=borrowers.borrowernumber
        LEFT JOIN circulation_rules ON ( items.itype=circulation_rules.itemtype AND rule_name = 'holdallowed' AND circulation_rules.branchcode IS NULL AND circulation_rules.categorycode IS NULL )
    WHERE
    reserves.found IS NULL
     AND reservedate >= ? AND reservedate <= ?
    AND (reserves.itemnumber IS NULL OR reserves.itemnumber = items.itemnumber)
    AND items.itemnumber NOT IN (SELECT itemnumber FROM branchtransfers where datearrived IS NULL)
    AND items.itemnumber NOT IN (select itemnumber FROM reserves where found IS NOT NULL)
    AND issues.itemnumber IS NULL
    AND reserves.priority <> 0 
    AND reserves.suspend = 0
    AND notforloan = 0 AND itemlost = 0 AND withdrawn = 0
    AND ( circulation_rules.rule_value IS NULL OR circulation_rules.rule_value != 0 )
     GROUP BY reserves.biblionumber ORDER BY biblio.title " with ParamValues: 0='2020-07-06', 1='2020-07-20'] at /home/vagrant/kohaclone/circ/pendingreserves.pl line 245.
Comment 1 Jonathan Druart 2020-07-23 06:38:38 UTC

*** This bug has been marked as a duplicate of bug 22431 ***