LP#1726568: expose circ lib and owning lib fields to spine/pocket labels
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 15 Nov 2018 14:59:44 +0000 (09:59 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 18 Feb 2019 18:23:38 +0000 (13:23 -0500)
commite4b7c9d0e0818de77b7baf0aa1850bd359c2ddaa
treeacdb7aad0aeb322cf4d80e5e1923596332357218
parent878c7078c3a9d6c13f67792bcf74aa511e7c4d0a
LP#1726568: expose circ lib and owning lib fields to spine/pocket labels

This patch fleshes the item circulation library and owning library
fields so that spine/pocket labels can include the short name or
full name of the OU rather than just the ID.  As a consequence, the
following fields are now available for label templates:

* copy['call_number.owning_lib.id']
* copy['call_number.owning_lib.shortname']
* copy['call_number.owning_lib.name']
* copy['circ_lib.id']
* copy['circ_lib.shortname']
* copy['circ_lib.name']

If, for some reason, existing label templates intentionally use
copy['call_number.owning_lib'] or copy['circ_lib'] to include the numeric
ID of the OU on the label, they will need to be replaced with
copy['call_number.owning_lib.id'] or copy['circ_lib.id'] respectively.

To test
-------
[1] Apply the patch.
[2] Open the print labels window for an item and try including one
    or more of the new fields listed above; verify that the current
    value is displayed on the label preview.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates/staff/share/print_templates/t_item_label.tt2
Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js