more
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 2 Apr 2012 15:02:03 +0000 (11:02 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 2 Apr 2012 15:03:01 +0000 (11:03 -0400)
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.hold-pull-list-view.sql [deleted file]
Open-ILS/src/templates/circ/hold_pull_list.tt2

index 2947880..2498393 100644 (file)
@@ -4763,7 +4763,7 @@ SELECT  usr,
             </actions>
         </permacrud>
        </class>
-       <!-- A note: Please update alhr and ahpl when updating ahr -->
+       <!-- A note: Please update alhr and ahopl when updating ahr -->
        <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
                <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
                        <field reporter:label="Status" name="status" oils_persist:virtual="true" />
@@ -4826,7 +4826,20 @@ SELECT  usr,
                        <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
                </links>
        </class>
-       <class id="ahpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_pull_list" oils_persist:tablename="action.hold_pull_list" reporter:label="Hold Pull List" oils_persist:readonly="true">
+       <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
+                       ahr.*,
+                       COALESCE(999, acplo.position) AS copy_location_order_position
+               FROM action.hold_request ahr
+               JOIN asset.copy acp ON (acp.id = ahr.current_copy)
+               LEFT JOIN asset.copy_location_order acplo
+                       ON (acp.location = acplo.location AND acp.circ_lib = acplo.org)
+               WHERE
+                       ahr.capture_time IS NULL AND
+                       ahr.cancel_time IS NULL AND
+                       (ahr.expire_time is NULL OR ahr.expire_time > NOW())
+               ]]></oils_persist:source_definition>
                <fields oils_persist:primary="id">
                        <field reporter:label="Status" name="status" oils_persist:virtual="true" />
                        <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.hold-pull-list-view.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.hold-pull-list-view.sql
deleted file mode 100644 (file)
index 3f38730..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
--- Evergreen DB patch XXXX.schema.hold-pull-list-view.sql
---
--- FIXME: insert description of change, if needed
---
-BEGIN;
-
-
--- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-CREATE VIEW action.hold_pull_list AS
-    SELECT
-        ahr.*,
-        COALESCE(999, acplo.position) AS copy_location_order_position
-    FROM action.hold_request ahr
-    JOIN asset.copy acp ON (acp.id = ahr.current_copy)
-    LEFT JOIN asset.copy_location_order acplo
-        ON (acp.location = acplo.location AND acp.circ_lib = acplo.org)
-    WHERE
-        ahr.capture_time IS NULL AND
-        ahr.cancel_time IS NULL AND
-        (ahr.expire_time is NULL OR ahr.expire_time > NOW()) ;
-
-
-COMMIT;
index 31ec209..aef4e4f 100644 (file)
@@ -27,7 +27,7 @@
         editOnEnter="true"
         editStyle="pane"
         showLoadFilter="true"
-        fmClass="'ahpl'"
+        fmClass="'ahopl'"
         baseSort="['copy_location_sort_order','call_number']"
         mapExtras="{copy_circ_lib:{path:'current_copy.circ_lib',filter:true}}"
         query="{copy_circ_lib: 4}">