LP#1895052: Avoid foreign targets when local items exist user/dyrcona/lp-1895052-pickup-library-controlled-stalling-signoff
authorMike Rylander <mrylander@gmail.com>
Mon, 28 Jun 2021 19:06:26 +0000 (15:06 -0400)
committerJason Stephenson <jason@sigio.com>
Fri, 13 Aug 2021 13:16:48 +0000 (09:16 -0400)
commit852675d99c5ac251d962fe5cae3dc5eafa7cd696
tree167dc09ac31396ef33dcd2a00a03dfc9e5afaae0
parent13b462eba1fd59c6b71f5cb7f1fa3ed1bb57eacc
LP#1895052: Avoid foreign targets when local items exist

This commit adds a new YAOUS that allows a pickup library to specify
that it does not want its holds to have foreign (prox > 0) copies
directly targeted if there is a local copy in an available status (on
the shelf).  The setting is an interval, and after the age of the hold
has passed that interval, foreign direct targetting is allowed.

This does not change the calculation of the potential list, so
op-capture will be availalbe (all else being equal) without
retargetting.

This setting (circ.pickup_hold_stalling.hard) is meant to be used in
concert with the other new setting in the parent commit
(circ.pickup_hold_stalling.soft), and should generally have a value the
same or smaller than the soft setting.  Doing this allows tiered
targetting, where no remote items are targeted via the hard setting for,
say, 3 days, where all capture is restricted to only the pickup, and
then, with a soft setting of 5 days, the next 2 days allow only direct
target capture of foreign copies.  After 5 days, normal, global
targetting and op-capture resumes.

An alternative use for this setting is to ignore the parent-commit soft
setting and allow op-capture everywhere, but only direct targetting at
the pickup library.  The effect of this, if used globally throughout an
entire Evergreen instance, would be that the pull list would only
represent pickup-local holds, but serendipitous scans of items that
could fill remote holds could capture for transit.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.stalling-YAOUS.sql