From 4475711331db8acaf3ae79fd308c59681f74201e Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 27 Jun 2012 18:38:19 -0400 Subject: [PATCH] Add two fields to the new FlattenerGrid-based hold pull list Namely (current) copy status and (number of) potential copies. I believe this implementation has a negligible impact on the efficiency of the hold pull list query overall. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Kathy Lussier --- Open-ILS/examples/fm_IDL.xml | 9 ++++++++- Open-ILS/src/templates/circ/hold_pull_list.tt2 | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index f7ef3fa084..5b9725a6b0 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -5048,7 +5048,8 @@ SELECT usr, TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label) AS call_number_label, siss.label AS issuance_label, - (ahr.usr <> ahr.requestor) AS is_staff_hold + (ahr.usr <> ahr.requestor) AS is_staff_hold, + ahcm_1.copy_count AS potential_copies FROM action.hold_request ahr JOIN asset.copy acp ON (acp.id = ahr.current_copy) JOIN asset.call_number acn ON (acp.call_number = acn.id) @@ -5071,6 +5072,11 @@ SELECT usr, ) ) ) + JOIN ( + SELECT COUNT(target_copy) AS copy_count, hold + FROM action.hold_copy_map + GROUP BY 2 + ) ahcm_1 ON (ahcm_1.hold = ahr.id) LEFT JOIN serial.issuance siss ON (ahr.hold_type = 'I' AND siss.id = ahr.target) LEFT JOIN asset.copy_location_order acplo @@ -5128,6 +5134,7 @@ SELECT usr, + diff --git a/Open-ILS/src/templates/circ/hold_pull_list.tt2 b/Open-ILS/src/templates/circ/hold_pull_list.tt2 index b468136657..91a2fdc067 100644 --- a/Open-ILS/src/templates/circ/hold_pull_list.tt2 +++ b/Open-ILS/src/templates/circ/hold_pull_list.tt2 @@ -89,6 +89,7 @@ Title Parts + Copy Status Hold Notes Patron Barcode Pickup Library -- 2.43.2