Bug 28510: Skip processing holds queue items from closed libraries when HoldsQueueSki...
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 3 Jun 2021 10:44:59 +0000 (06:44 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 28 Sep 2021 13:12:45 +0000 (15:12 +0200)
commitb7ae33b47bb891830a09ce2062ef13c1096b2bae
tree41b7231b0694435984ecbe66a96f23d00c17627f
parent9588776baca1c4464bb70441202d0eb7c611d53b
Bug 28510: Skip processing holds queue items from closed libraries when HoldsQueueSkipClosed is enabled

Right now we skip closed branch's items as we iterate over all items looking for ones to fill a hold. If HoldsQueueSkipClosed is enabled, no items held be a closed library can be targeted, so it would be more efficient if we never selected the items from those branches to begin with. This is how the holds queue works if we are not using the transport cost matrix, so we should make it work the same way if we *are* using the matrix.

Test Plan:
1) Apply this patch
2) prove prove t/db_dependent/HoldsQueue.t
3) All tests should continue to pass

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/HoldsQueue.pm