LP #1092921: Display of/sorting by CN affixes in Simplified Hold Pull List collab/senator/lp-1092921-pull-list-affixes
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 2 Jan 2013 17:33:36 +0000 (12:33 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 2 Jan 2013 17:33:36 +0000 (12:33 -0500)
In the Simplified Hold Pull List interface, the "Call Number Label" column
displays the call number of the copy targeted by the hold in each row,
and it does so by combining affixes with the actual label field.
Sorting of this column actually uses the call number sortkey generated
in-database for this purpose.

Sometimes this means that sorting order doesn't match what you'd
expect to see with this column.  Opinions differ on desired behavior, so
now you can explicity add columns to the table for call number prefix
and suffix, and sort on either of those (potentially in combination with
other columns).

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/circ/hold_pull_list.tt2

index 67056a8..49f3b95 100644 (file)
@@ -84,7 +84,7 @@
         defaultSort="['copy_location_order_position','call_number_sort_key']"
         mapExtras="map_extras"
         suppressFilterFields="['copy_circ_lib']"
-        sortFieldReMap="{call_number_label:'call_number_sort_key',shelving_loc:'copy_location_order_position'}"
+        sortFieldReMap="{call_number_label:'call_number_sort_key',cn_prefix:'current_copy.call_number.prefix.label_sortkey',cn_suffix:'current_copy.call_number.suffix.label_sortkey',shelving_loc:'copy_location_order_position'}"
         fetchLock="true"
         query="{}">
         <thead>
                 <th field="request_lib_shortname" fpath="request_lib.shortname" _visible="false" ffilter="true">[% l('Request Library (Shortname)') %]</th>
                 <th field="selection_ou" fpath="selection_ou.shortname" _visible="false" ffilter="true">[% l('Selection Locus') %]</th>
                 <th field="sms_carrier_name" fpath="sms_carrier.name" _visible="false" ffilter="true">[% l('SMS Carrier') %]</th>
+                <th field="cn_prefix" fpath="current_copy.call_number.prefix.label" _visible="false" ffilter="true" fsort="true">[% l('Call Number Prefix') %]</th>
+                <th field="cn_suffix" fpath="current_copy.call_number.suffix.label" _visible="false" ffilter="true" fsort="true">[% l('Call Number Suffix') %]</th>
             </tr>
         </thead>
     </table>