[Bug 11677] New: Limit to Only items currently available for loan or reference not working!
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Bug ID: 11677 Summary: Limit to Only items currently available for loan or reference not working! Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org The ability to limit a search to only available items does not seem to be working as expected. Sometimes records with available items are not included in the results. Example: http://screencast.com/t/OVgYybzLE -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=5958 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Peggy Thrasher <p.thrasher@dover.nh.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |p.thrasher@dover.nh.gov --- Comment #1 from Peggy Thrasher <p.thrasher@dover.nh.gov> --- I can cause this problem as follows: Search in the OPAC Click on a title to take you to the detail page Click on the author's name or a subject heading When you have the new summary screen with the author's or subject's listings, click on limit to Currently Available. Then bad things happen. Looks like it is searching for "available" in one instance, doesn't find anything in other instances, or displays the wrong list (1 item instead of 291 results) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 --- Comment #2 from Peggy Thrasher <p.thrasher@dover.nh.gov> --- Search string from Advanced Search Author: http://librarystaff.dover.nh.gov/cgi-bin/koha/catalogue/search.pl?idx=au&q=patterson+james&op=and&idx=kw&q=&op=and&idx=kw&q=&limit-yr=&limit=&limit=&limit=&limit=&limit=&limit=&sort_by=relevance limited to currently available: http://librarystaff.dover.nh.gov/cgi-bin/koha/catalogue/search.pl?idx=au&q=patterson%20james&sort_by=relevance&limit=available Search string from clicking on Author's name: http://librarystaff.dover.nh.gov/cgi-bin/koha/catalogue/search.pl?q=au:%22Pa... limited to currently available: http://librarystaff.dover.nh.gov/cgi-bin/koha/catalogue/search.pl?q=ccl=au%3A%22Patterson%2C%20James%2C%22&limit=available Should we be stripping out the quotes when clicking on author's name? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #3 from Barton Chittenden <barton@bywatersolutions.com> --- I have replicated this issue at a partner's library, in this case the full search showed both books and audio disks available. When the 'limit to available' facet is selected, only available audio books are returned by the search. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 --- Comment #4 from Barton Chittenden <barton@bywatersolutions.com> --- Examples from OPAC: Search for "Alex+Rider+Horowitz" shows records of type "book" and "sound", both available and un-available. http://catalog.losgatosca.gov/cgi-bin/koha/opac-search.pl?q=Alex+Rider+Horow... Clicking "Limit to currently available items." Shows only available items of type "sound". http://catalog.losgatosca.gov/cgi-bin/koha/opac-search.pl?idx=kw&q=Alex%20Rider%20Horowitz&sort_by=relevance_dsc&limit=available -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olli-antti.kivilahti@jns.fi --- Comment #5 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- We have the same issue when making a keyword search, then faceting by branch, then limiting by availability. Limiting by availability currently seems to display only results for which all items are available, even if one item is checked out, the whole result is filtered. What is needed is a feature to limit by availability for a certain branch, not just general availability. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 --- Comment #6 from Olli-Antti Kivilahti <olli-antti.kivilahti@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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 --- Comment #7 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Sharing is caring! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 --- Comment #8 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 32096 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32096&action=edit Bug 11677 - (KD-157) Limit to Only items currently available for loan or reference not working! 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. Comments out that Zebra availability search and deals with availability on Koha-side. Gets the branch or holdingbranch limit from opac-search.pl or search.pl and uses that to skip Zebra results which are onloan or notforloan. Updates the result set size when results are removed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29864|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 --- Comment #9 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 32101 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32101&action=edit Bug 11677 - Limit to Only items currently available for loan or reference not working! 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. Comments out that Zebra availability search and deals with availability on Koha-side. Gets the branch or holdingbranch limit from opac-search.pl or search.pl and uses that to skip Zebra results which are onloan or notforloan. Updates the result set size when results are removed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32096|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Limit to Only items |Limit to Only items |currently available for |currently available for |loan or reference not |loan or reference not |working! |working -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32101|0 |1 is obsolete| | --- Comment #10 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 32547 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32547&action=edit Bug 11677 - Limit to Only items currently available for loan or reference not working! This row: $availability_limit .= "( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and (lost,st-numeric=0) )"; 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. Comments out that Zebra availability search and deals with availability on Koha-side. Gets the branch or holdingbranch limit from opac-search.pl or search.pl and uses that to skip Zebra results which are onloan or notforloan. Updates the result set size when results are removed. Fixed a bug where pagination broke, due to the $results_hash->{'RECORDS'} -array getting populated always starting from 0, where it should have started from the given $offset. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Assignee|gmcharlt@gmail.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- As we have deprecated GRS-1, we could just focus on DOM, and implement this using XSLT's for calculating, instead of crafting the search string. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32547|0 |1 is obsolete| | --- Comment #12 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 34431 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34431&action=edit Bug 11677 - Limit to Only items currently available for loan or reference not working! This row: $availability_limit .= "( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and (lost,st-numeric=0) )"; 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. Comments out that Zebra availability search and deals with availability on Koha-side. Gets the branch or holdingbranch limit from opac-search.pl or search.pl and uses that to skip Zebra results which are onloan or notforloan. Updates the result set size when results are removed. Fixed a bug where pagination broke, due to the $results_hash->{'RECORDS'} -array getting populated always starting from 0, where it should have started from the given $offset. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #13 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Hi there! We have this in production now for ~2-3 months. Works fine and doesn't cause too much of a slowdown. I recommend XSLT-magic to properly solve this issue. Back then I didn't know XSLT yet to make logic expressions with it but it would definetely be the best alternative. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org