LP 1827250: Fix Last Captured Hold Check for Holds Shelf rel_3_4_beta1_rebase
authorJason Stephenson <jason@sigio.com>
Thu, 2 May 2019 12:36:15 +0000 (08:36 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 13 Sep 2019 20:56:04 +0000 (16:56 -0400)
commit8e727c0a1e04d2c88a155c168873fc13376d5a1f
tree98b8727e4be6d2f43249c894e8064d1fd3f2a3cb
parent29fcaa2eaf7f5494137bff8b8e65b1fcc3bc6434
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, the order by
in the query fails to take into account holds with a NULL capture time
on the same copy will sort before the captured holds.  This patch
rectifies this situation by adding "NULLS LAST" to the order by.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm