The hold shelf rewrite brought back an old behavioral bug where items deleted
while on the hold shelf continued to show on the hold shelf list. The most
recent behavior was to ignore those items, which this commit does. It also
addresses an adjacent issue where holds may show with "Hold Shelf Delay"
instead of "Ready For Pickup" in some cases.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com>
Signed-off-by: Ben Shum <ben@evergreener.net>
WHEN cp.status = 6 THEN 3
WHEN EXTRACT(EPOCH FROM COALESCE(NULLIF(BTRIM(hold_wait_time.value,'"'),''),'0 seconds')::INTERVAL) = 0 THEN 4
WHEN NOW() + COALESCE(NULLIF(BTRIM(hold_wait_time.value,'"'),''),'0 seconds')::INTERVAL > NOW() THEN 5
- ELSE 5
+ 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,
usr_id => 'u.id',
cs_id => 'cs.id',
cp_id => 'cp.id',
+ cp_deleted => 'cp.deleted',
cancel_time => 'h.cancel_time',
tr_cancel_time => 'tr.cancel_time',
);
last_captured_hold: 'true',
capture_time : { not : null },
cs_id : 8, // on holds shelf
+ cp_deleted : 'f',
fulfillment_time : null,
current_shelf_lib : $scope.pickup_ou.id()
};