From: Mike Rylander Date: Wed, 3 Oct 2018 14:05:09 +0000 (-0400) Subject: LP#1795906: Queue position parity for OPAC and Record -> View Holds UIs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a242104a70179c3980a929bdaa1f9a4a4952efd5;p=working%2FEvergreen.git LP#1795906: Queue position parity for OPAC and Record -> View Holds UIs With the performance driven changes to Hold Shelf and Record -> View Holds UIs, and backing APIs, there is a discrepancy between conception of queue position in those UIs and that of others. A simple change will bring other UIs in line with the new calculation without sacrificing performance in any of them. In fact, other UIs will be (slightly) faster in most cases. This change makes all queue position calculations relative to the context hold's pickup library. This retains the order relative to other directly relevant holds, though does not show the global position. The initial driver of this request is parity between the My OPAC queue position, which can optionally be displayed to patrons, and the Record -> View Holds staff UI. NOTE: All queue position values are FIFO-based estimates and do not perfectly model reality, especially in a resource sharing consortium and even for instances using FIFO hold capture across the board, due to transits, exceptions, and human staff interaction with the hold queue. Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index dcbe7dda4f..1cc1f9b4f3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -1371,6 +1371,7 @@ sub retrieve_hold_queue_status_impl { select => {ahr => ['id', 'cut_in_line', 'request_time']}, from => 'ahr', where => { + pickup_lib => $hold->pickup_lib, id => { in => { select => { ahcm => ['hold'] }, from => { @@ -1414,6 +1415,7 @@ sub retrieve_hold_queue_status_impl { { "class" => "ahr", "field" => "request_time" } ], where => { + pickup_lib => $hold->pickup_lib, hold_type => $hold->hold_type, target => $hold->target, capture_time => undef,