LP#1902937: WIP - allow adjacent-copy capture during stalling user/miker/lp-1902937-adjacent-hold-capture-when-stalling
authorMike Rylander <mrylander@gmail.com>
Tue, 10 Nov 2020 18:14:14 +0000 (13:14 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 10 Nov 2020 18:14:14 +0000 (13:14 -0500)
commit5ce57d751cc0076d6a46615840f30ce16945de78
tree7c1886375e7bac5a48375d5b4514c92dbd2b3412
parent4d50691b51047128d8dafdcd5c0f06d8223d0532
LP#1902937: 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>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm