From: Mark Cooper Date: Mon, 18 Mar 2013 22:45:14 +0000 (-0700) Subject: LP1156905 lineitem worksheet sorts copies by org X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=572e9a28bc3bba7a5543cad3b00bc0f913f9328a;p=evergreen%2Fpines.git LP1156905 lineitem worksheet sorts copies by org 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 Signed-off-by: Bill Erickson --- 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 cd0bb36c88..08f8766865 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -8006,6 +8006,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; @@ -8018,7 +8023,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 %]