LP1866667 - Clear current_copy when pickup_lib is changed and waiting for capture user/stompro/lp1866667_hold_pickup_loc_change_retarget
authorJosh Stompro <stompro@stompro.org>
Tue, 10 Mar 2020 16:38:48 +0000 (11:38 -0500)
committerJosh Stompro <stompro@stompro.org>
Tue, 10 Mar 2020 16:38:48 +0000 (11:38 -0500)
commit1a9415a98d34fd4f4917fa6112c1d859ad8f4c64
tree111250f1d643e81c74796462d1a9b4c39d088af9
parentf60f0562450569c2e46b1187392dbfede35faf79
LP1866667 - Clear current_copy when pickup_lib is changed and waiting for capture

When a user changes the pickup lib and a retarget is triggered
the currently targeted copy gets excluded if there are other
available copies.

This can cause delays and confusion since the new copy may
not be the best choice.

This change clears the current_copy before the retarget in that
situation.

Testing setup.

Find/create a title with items that looks like:

System X ->
   Branch A -> Holdable item
   Branch B ->
System Y
   Branch C -> Holdable item
   Branch D -> Holdable item

Place a hold with a pickup location of Branch B, which should target
the closest item at Branch A

Then change the pickup location of your hold to Branch A.

The retarget that happens, should switch the targeted copy to Branch C or D.

After Change Applied:

The hold should remain targeted to Branch A after pickup lib is changed
to Branch A.

Signed-off-by: Josh Stompro <stompro@stompro.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm