https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30155
Bug ID: 30155
Summary: We shouldn't calculate get_items_that_can_fill when we
don't have any holds
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Circulation
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
This breaks the 'Holds to pull' report in 21.05.09 if there are no holds
"Fixed" by bug 3142 in 21.05.11 and master
The problem is essentially that calculation of @bibs_or_items can be empty if
no holds are passed, so our SQL Abstract call ends up with an emptpy -or block,
which in turn leads to our where beginning with "AND"
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near
'AND `itemlost` = '0' AND `itemnumber` NOT IN ( '156269' ) AND 1=1 AND
`notforloa' at line 1 [for Statement "SELECT `me`.`itemnumber`,
`me`.`biblionumber`, `me`.`biblioitemnumber`, `me`.`barcode`,
`me`.`dateaccessioned`, `me`.`booksellerid`, `me`.`homebranch`, `me`.`price`,
`me`.`replacementprice`, `me`.`replacementpricedate`, `me`.`datelastborrowed`,
`me`.`datelastseen`, `me`.`stack`, `me`.`notforloan`, `me`.`damaged`,
`me`.`damaged_on`, `me`.`itemlost`, `me`.`itemlost_on`, `me`.`withdrawn`,
`me`.`withdrawn_on`, `me`.`itemcallnumber`, `me`.`coded_location_qualifier`,
`me`.`issues`, `me`.`renewals`, `me`.`reserves`, `me`.`restricted`,
`me`.`itemnotes`, `me`.`itemnotes_nonpublic`, `me`.`holdingbranch`,
`me`.`timestamp`, `me`.`location`, `me`.`permanent_location`, `me`.`onloan`,
`me`.`cn_source`, `me`.`cn_sort`, `me`.`ccode`, `me`.`materials`, `me`.`uri`,
`me`.`itype`, `me`.`more_subfields_xml`, `me`.`enumchron`, `me`.`copynumber`,
`me`.`stocknumber`, `me`.`new_status`, `me`.`exclude_from_local_holds_priority`
FROM `items` `me` WHERE ( ( AND `itemlost` = ? AND `itemnumber` NOT IN ( ? )
AND 1=1 AND `notforloan` = ? AND `onloan` IS NULL AND `withdrawn` = ? ) )" with
ParamValues: 0=0, 1=156269, 2=0, 3=0] at /usr/share/koha/lib/Koha/Objects.pm
line 145
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/