Bug 10628: make sure AutomaticItemReturn doesn't prevent holds queue from filling local holds with local items
For some reason, C4::HoldsQueue::MapItemsToHoldRequests used the system
preference AutomaticItemReturn to decide if an attempt to fill local
holds with local items. No explanation of this behavior is provided.
This patch removes this behavior, and also adjusts the calculation
of the lead-cost library to always return the pickup library if it
is on the list of libraries that could fill the hold -- on the
basis that if the item is already at the pickup library, its
transport cost is inherently zero.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and adds unit tests.
Tested with some examples and those worked correctly.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit
d46657f8af980524a4351e40abe0b901d1af3e6a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Small merge problem in the tests.
(cherry picked from commit
7c7aee054fa8af8e753d7f9391a27efb83f9b52c)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit
7c7aee054fa8af8e753d7f9391a27efb83f9b52c)