[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
Wed Aug 14 23:47:18 CEST 2019


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

Hayley Mapley <hayleymapley at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #92176|0                           |1
        is obsolete|                            |

--- Comment #34 from Hayley Mapley <hayleymapley at catalyst.net.nz> ---
Created attachment 92202
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92202&action=edit
Bug 11677: Use zebra not-onloan-count index for availability limit

This uses the work from bug 18098 to use the count of not-onloan items to
determine availability.

It keeps the allrecords,AlwaysMatches='' portion of the query so it still
catches
records with the tested indexed missing.
These shouldn't exist except in the case of missing data, but kept for future
use as well as
it has no negative impact and minimizes the change made.

Note that availability in this sense means not check out and not lost.
Transfers, holds, and not for loan statuses
should probably have indexes built in the same way as bug 18098 (there are
related FIXMEs in the code)

This updates the export_records file used for testing - adding three records
with a not-onloan-count (999$x) of 1,
but marking the item on the third record lost to prevent its return

To test:
   1 - make sure SearchEngine pref is set to 'Zebra'
   2 - Do a search on the OPAC that returns some records
   3 - Find a record in those results with more than one 1 item, and checkout 1
leaving 1 (or more) available
   4 - Find another record with only 1 item, check that item out
   5 - Limit opac search to available items - both records disappear
   6 - Apply patch
   7 - Restart all the things
   8 - Repeat search
   9 - First record should show, but no second
  10 - Mark other items of first record as lost, return items on second record
  11 - Repeat search, first record should not be in results, second should
  12 - prove -v t/db_dependent/Search.t

Signed-off-by: Hayley Mapley <hayleymapley at catalyst.net.nz>

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


More information about the Koha-bugs mailing list