LP#1903749: WIP - allow adjacent-copy capture during stalling
authorMike Rylander <mrylander@gmail.com>
Tue, 10 Nov 2020 18:14:14 +0000 (13:14 -0500)
committerMichele Morgan <mmorgan@noblenet.org>
Fri, 13 Aug 2021 19:52:15 +0000 (19:52 +0000)
commit9d9748b0149cd991fae7e548aab832e96829e503
treea8c9594b235179e7d091645a05ff88e701ef79cb
parentd323b832290103bdd4e49ee225bcefb18a124d6d
LP#1903749: WIP - allow adjacent-copy capture during stalling

Currently, setting a stalling interval disable all opportunistic capture
except at the pickup library.  It would be helpful to allow, optionally,
a mode where holds that target a copy physically adjacent to the copy
that staff pull from the shelf to fill the hold, all else being equal.
This commit does that by:

1) confirming that hold stalling and the a new setting are both in use
2) gathering shelf-adjacent copies that are available
3) gathering holds that directly target those adjacent copies
4) filtering those hold to only those that the copy in hand could fill
5) adding that filtered list to the end of the $old_holds list for
   last-resort capture testing
6) avoiding retargetting of adjacent-copy-targetted holds, they can
   still capture

TODO: be more flexible for criteria?

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm