LP1092921 - Add prefix and suffix to simplified pull list user/bshum/simple-pull-list-prefix-suffix
authorBen Shum <bshum@biblio.org>
Mon, 31 Dec 2012 22:00:21 +0000 (17:00 -0500)
committerBen Shum <bshum@biblio.org>
Mon, 31 Dec 2012 22:10:24 +0000 (17:10 -0500)
As described in LP 1092921, prefix and suffix are not included when
sorting using call numbers in the simplified pull list.

This patch adds columns for prefix and suffix so that it is possible
to sort with them if configured to do so.

Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/templates/circ/hold_pull_list.tt2

index a7a765d..3d8c392 100644 (file)
@@ -5045,8 +5045,12 @@ SELECT  usr,
                                        COALESCE(au.second_given_name, '')
                                ], ' '), E'\\s+,', ',')
                        END AS usr_display_name,
-                       TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
+                       TRIM(acnp.label)
+                               AS call_number_prefix,
+                       TRIM(acn.label)
                                AS call_number_label,
+                       TRIM(acns.label)
+                               AS call_number_suffix,
                        siss.label AS issuance_label,
                        (ahr.usr <> ahr.requestor) AS is_staff_hold,
                        ahcm_1.copy_count AS potential_copies
@@ -5131,7 +5135,9 @@ SELECT  usr,
                        <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
                        <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
                        <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
+                       <field reporter:label="Call Number Prefix" name="call_number_prefix" reporter:datatype="text" />
                        <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
+                       <field reporter:label="Call Number Suffix" name="call_number_suffix" reporter:datatype="text" />
                        <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
                        <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
                        <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
index 67056a8..9a4ca3f 100644 (file)
@@ -90,7 +90,9 @@
         <thead>
             <tr>
                 <th field="shelving_loc" fpath="current_copy.location.name" ffilter="true">[% l('Shelving Location') %]</th>
+                <th field="call_number_prefix" fpath="call_number_prefix" _visible="false" ffilter="true">[% l('Call Number Prefix') %]</th>
                 <th field="call_number_label" fpath="call_number_label" ffilter="true"></th>
+                <th field="call_number_suffix" fpath="call_number_suffix" _visible="false" ffilter="true">[% l('Call Number Suffix') %]</th>
                 <th field="author" fpath="current_copy.call_number.record.simple_record.author" ffilter="true">[% l('Author') %]</th>
                 <th field="title" fpath="current_copy.call_number.record.simple_record.title" ffilter="true">[% l('Title') %]</th>
                 <th field="barcode" fpath="current_copy.barcode" ffilter="true"></th>