LP 1827250: Fix Last Captured Hold Check for Holds Shelf user/mmorgan/lp1827250_last_captured_hold_fix_nulls_last_signoff
authorJason Stephenson <jason@sigio.com>
Thu, 2 May 2019 12:36:15 +0000 (08:36 -0400)
committerMichele Morgan <mmorgan@noblenet.org>
Fri, 13 Sep 2019 19:44:51 +0000 (15:44 -0400)
commit4626d90a5663f4c444b650313dd6a40dbdd3d114
tree7efd20b0c3b2a68536e8f8c614e5fc350f82d66d
parent10e77568568baef8b09cab6bce6b799d8211be31
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>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm