From 9ad7a253c183e0e9d9516d79924484725da7b24e Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Wed, 1 May 2019 14:19:06 -0400 Subject: [PATCH] LP 1827250: Fix Last Captured Hold Check for Holds Shelf When the current copy on an on shelf hold is the same as that on some uncaptured holds, the hold fails to appear on the hold shelf when it should. This comes down to some SQL in the storage function to retrieve wide holds: open-ils.storage.action.live_holds.wide_hash. The intent of the new code is to check that the current hold matches the most recently captured hold for the copy. However, it fails to take into account that non-captured holds could have the same current copy as the presently captured and on shelf hold. This patch rectifies this by limiting the check to captured holds. Signed-off-by: Jason Stephenson --- .../src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm index 4a49804acc..df730d7a1c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm @@ -2145,6 +2145,7 @@ sub wide_hold_data { SELECT id FROM action.hold_request recheck WHERE recheck.current_copy = cp.id + AND recheck.capture_time IS NOT NULL ORDER BY capture_time DESC LIMIT 1 ))) -- 2.11.0