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)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 8 Oct 2021 12:18:40 +0000 (08:18 -0400)
commit4b825ce3a53d7fceedd4118554c91eaf9e360793
tree6dc92370b0d3bfd6ce3c38d77e1d6ebaf1a58c7e
parent0c6b4afe0275c3291350a9666a2212738e2f5f42
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/HoldsQueue.pm