Bug 14972

Summary: Limit by availability does not return results if *any* items are on-loan or lost
Product: Koha Reporter: Barton Chittenden <barton>
Component: SearchingAssignee: Galen Charlton <gmcharlt>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gaetan.boisson, indradg, sally.healey, thysia
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17278
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Marc file containing 2 test bibs

Description Barton Chittenden 2015-10-07 14:55:47 UTC
Viewing search results on search.pl -- if I click 'Limit to currently available items.', any Bib records that have items which are on-loan or lost do not show in the facet search results.
Comment 1 Barton Chittenden 2015-10-07 16:57:47 UTC
Created attachment 43197 [details]
Marc file containing 2 test bibs

To replicate:

Setup:

Create the branches and itemtypes with the following branch codes, itemtypes respectively:

Branches
========

BAILEYCOVE
BOOKMOBILE
GURLEY
HAZELGREEN
MADISON
MAIN
MONROVIA
MURPHY
NEWHOPE
OUTREACH
RUSSELL
SHOWERS
TRIANA

Item types
==========
BOOK
BOOKCD
QUICKPICK

Import 'test_bug_14972', and make sure that both bibs are indexed.

Step by step:

1) Do a keyword search on 'Gray Mountain', you should see two bibs with multiple items.
2) Click 'Limit to currently available items' -- this should show the same two bibs.
-- note that under 3.16, where I identified the bug, this is what happens, on master, I don't get any results whatsoever -- so the bug is worse on master than it is in a previous version.
3) Check out one item on one of bibs, wait for fast-indexing to catch up.
4) Re-run steps 1)  and 2). Now, 'Limit to currently available items' only shows the bib with no items checked out -- even though both bibs still have items available for checkout.
Comment 2 Indranil Das Gupta 2017-01-03 20:03:42 UTC
This bug seems to be present in 16.11 as well.
Comment 3 Gaetan Boisson 2018-03-13 13:44:13 UTC

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