Bug 13022 - Hardcoded limit causes records with more than 20 items to show inaccurate...
commitf552e658e44208e86b03bcd659d41eaedd69ae46
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 2 Oct 2014 13:19:21 +0000 (2 09:19 -0400)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 4 Jan 2016 07:29:10 +0000 (4 08:29 +0100)
tree53532cc45b6e1e54d979415951839dd97d02b6a0
parent8314d1beb5cd38a0d9e8a1cbbca13be508727fd9
Bug 13022 - Hardcoded limit causes records with more than 20 items to show inaccurate statuses

If a record has more than 20 items, all the items over 20 will show as
available on the search results even if they are not!

This is a hard coded limit in the Search module. This number should be
configurable.

Test Plan:
1) Create a record with more than 20 items
2) Set all the items to waiting holds or in transit
3) Search for results that will include that item
4) Note some say they are available even though they are not
5) Apply this patch
6) Run updatedatabase.pl
7) Set the new system preference MaxSearchResultsItemsPerRecordStatusCheck
   to a number larger than the number of items on your record
8) Re-run the search
9) Note that the hold and transit statuses for the items are now correct

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit d3184fa85b8906d0921522ce0c26dab98a4a2778)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/Search.pm
installer/data/mysql/atomicupdate/bug_13022.sql [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref