LP#1075401: adjust two fields in the legacy Serials Copy Template editor
authorMichele Morgan <mmorgan@noblenet.org>
Tue, 18 Apr 2017 16:11:01 +0000 (12:11 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 7 Aug 2017 20:41:47 +0000 (16:41 -0400)
This commit changes the Age Protection and Circ as Type fields to links in
the fm_IDL.xml to allow the template to read the data in the fields. It also
changes the owning_lib reporter type to org_unit so the org unit shortname
is displayed in the grid view, along with fixing the config.floating_group cfg
FM settings so that the name is displayed instead of the ID.

[Note from Galen: the forthcoming web staff serials module's serial
 copy template editor already provided drop-downs for those two fields,
 but the IDL changes remain beneficial.]

Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Josh Stompro <stomproj@larl.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/examples/fm_IDL.xml

index bc99527..cfcdd10 100644 (file)
@@ -6901,18 +6901,18 @@ SELECT  usr,
        <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">
                <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
                        <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
-                       <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
+                       <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
                        <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
                        <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
                        <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
                        <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
                        <field reporter:label="Name" name="name" reporter:datatype="text"/>
-                       <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
+                       <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
                        <field reporter:label="Status" name="status" reporter:datatype="link"/>
                        <field reporter:label="Location" name="location" reporter:datatype="link"/>
                        <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
                        <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
-                       <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
+                       <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
                        <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
                        <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
                        <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
@@ -6920,7 +6920,7 @@ SELECT  usr,
                        <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
                        <field reporter:label="Price" name="price" reporter:datatype="money"/>
                        <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
-                       <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
+                       <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
                        <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
                        <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
                        <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
@@ -6935,6 +6935,8 @@ SELECT  usr,
                        <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
                        <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
                        <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
+                       <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
+                       <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
@@ -11571,7 +11573,7 @@ SELECT  usr,
        </class>
        <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
                <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
+                       <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
                        <field reporter:label="Name" name="name" reporter:datatype="text"/>
                        <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
                        <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>