Koha/t/db_dependent/Holds
Andrew Nugged d3a37911cf
Bug 24185: Make holds page faster: Preparatory refactoring
This is just refactoring. extracting logically independent code
to separate sub + tests update. No logic change yet.

Searching for "any_available" item among all biblionumber items was done
inside of "elsif on_shelf_holds == 2", and it is logically very independent
piece of code (this "@items" loop), it needs just biblionumber and patron
as parameters so it can be extracted into separate subroutine, and
later also called/reused from somewhere else.

This ability to call from another place also made for future patch
to remove O(n^2) problem with nested loops.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-25 09:40:39 +00:00
..
DisallowHoldIfItemsAvailable.t Bug 24185: Make holds page faster: Preparatory refactoring 2020-03-25 09:40:39 +00:00
HoldFulfillmentPolicy.t Bug 14711: Change prototype for AddReserve - pass a hashref 2020-02-11 14:32:47 +00:00
HoldItemtypeLimit.t Bug 14711: Change prototype for AddReserve - pass a hashref 2020-02-11 14:32:47 +00:00
LocalHoldsPriority.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
RevertWaitingStatus.t Bug 23463: Replace AddItem calls with Koha::Item->store 2020-03-23 09:26:26 +00:00
WaitingReserves.t Bug 12063: [QA Follow-up] Small change of two test scripts 2017-05-09 08:59:40 -04:00