[Koha-bugs] [Bug 11677] Limit to Only items currently available for loan or reference not working!

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 18 19:39:35 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677

--- Comment #6 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Created attachment 29864
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29864&action=edit
Bug 11677 - Limit to Only items currently available for loan or reference not
working!

Worklog entries FYI: (A proper patch follows (unless somebody does it first))

Identified this issue.
Looking for a solution.
Browsing the Zebra manual for answers on regexp, regexps not supported :(
Made it possible to accurately and quickly filter results by holdingbranch and
onloan. So "Selecting available" now works when a library is selected as well.
This causes normal "Selecting available"-feature to not work in it's mutant
form.
Need to refactor the default value for items.onloan from NULL to '0000-00-00'
to fix it.

This row:
$availability_limit .=
"( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and
(lost,st-numeric=0) )"; #or ( allrecords,AlwaysMatches='' not
lost,AlwaysMatches='')) )";
Causes all records in Zebra to be selected and removes records with even one
item onloan (even if items would be available)!
This is obviously wrong, but because Zebra (and not many other text indexers)
cannot deal with (If undef)-search terms, a fix might be to set 952$q (onloan)
datetime to 0000-00-00 instead of NULL in the DB.
Then we could find Records with items where onloan is 0000-00-00.

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


More information about the Koha-bugs mailing list