From: Mark Cooper Date: Mon, 18 Mar 2013 22:45:14 +0000 (-0700) Subject: Lineitem copies (details) were set to be sorted by branch ('owning_lib') X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=390110989ea847bd4e19b14864dca2f7ed5c7e55;p=working%2FEvergreen.git Lineitem copies (details) were set to be sorted by branch ('owning_lib') by default. However this was not happening because the lineitem_details 'owning_lib' referenced a fieldmapper object (not an id or name). This submission sets the owning_lib to the shortname so that sorting can occur in the intended way. Signed-off-by: Mark Cooper --- diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index d693e6ce37..67b5b1e5e4 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -7952,6 +7952,11 @@ $$ + + [% FOREACH detail IN li.lineitem_details %] + [% detail.owning_lib = detail.owning_lib.shortname %] + [% END %] + [% FOREACH detail IN li.lineitem_details.sort('owning_lib') %] [% IF detail.eg_copy_id; @@ -7964,7 +7969,7 @@ $$ %] - [% detail.owning_lib.shortname %] + [% detail.owning_lib %] [% IF copy.barcode %][% detail.barcode %][% END %] [% IF cn_label %][% cn_label %][% END %] [% IF detail.fund %][% detail.fund.code %] ([% detail.fund.year %])[% END %]