LP#1819540 - Change expire list to match what the hold expire function
authorSteven Callender <stevecallender@esilibrary.com>
Tue, 19 Mar 2019 16:57:55 +0000 (12:57 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 21 Apr 2020 13:44:29 +0000 (09:44 -0400)
Updated to use 'today'::timestamptz as suggested by Mike Rylander.

Testing:

1. Update a few holds that show up on the hold shelf so their shelf time
is set to now.

2. Confirm that you see them on the holds shelf.

3. Show clearable holds, holds are on the list.

4. Check in one of the items, and see that it goes back on the hold shelf.

After Fix Applies.

1. Update a few holds that show up on the hold shelf so their shelf time
is set to now.

2. Confirm that you see them on the holds shelf.

3. Show clearable holds, holds are no longer on the list.

Signed-off-by: Steven Callender <stevecallender@esilibrary.com>
Signed-off-by: Josh Stompro <stompro@stompro.org>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>

Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

index 2a5c87e..6c69acb 100644 (file)
@@ -2177,7 +2177,7 @@ SELECT  h.id, h.request_time, h.capture_time, h.fulfillment_time, h.checkin_time
              ELSE 4
         END AS hold_status,
 
-        (h.shelf_expire_time < NOW() OR h.cancel_time IS NOT NULL OR (h.current_shelf_lib IS NOT NULL AND h.current_shelf_lib <> h.pickup_lib)) AS clear_me,
+        (h.shelf_expire_time < 'today'::timestamptz OR h.cancel_time IS NOT NULL OR (h.current_shelf_lib IS NOT NULL AND h.current_shelf_lib <> h.pickup_lib)) AS clear_me,
 
         (h.usr <> h.requestor) AS is_staff_hold,