This patch addresses a now-theoretical issue where a direct PCRUD
query of ahopl could return duplicate rows in cases where the patron
linked to the hold request has multiple penalties attached.
The significance of this change is likely minor nowadays, as ahopl
was directly used by Evergreen only by the Dojo and AngularJS hold
pull lists, and as of 3.8 the Evergreen Angular pull list uses a
different approach for querying the pull list. However, until such
time as ahopl is deprecated and removed, this change may help
local integrations.
Signed-off-by: blake <blake@mobiusconsortium.org>
Signed-off-by: Jennifer Weston <jennifer.weston@equinoxOLI.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
</class>
<class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
<oils_persist:source_definition><![CDATA[
- SELECT
+ SELECT DISTINCT
ahr.*,
COALESCE(acplo.position, acpl_ordered.fallback_position) AS
copy_location_order_position,