From c4ce237aaab9c25c41334c30852d2ea640730efe Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 10 Apr 2014 12:47:22 +0200 Subject: [PATCH] Pflichtenheft -> Angebot/Auftrag: Positionen in richtiger Reihenfolge anlegen MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit …und zwar in der Reihenfolge, in der die Abschnitte im Pflichtenheft angeordnet sind. --- SL/Controller/RequirementSpecOrder.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/Controller/RequirementSpecOrder.pm b/SL/Controller/RequirementSpecOrder.pm index a3b6889d3..8c33d6ffd 100644 --- a/SL/Controller/RequirementSpecOrder.pm +++ b/SL/Controller/RequirementSpecOrder.pm @@ -60,7 +60,7 @@ sub action_create { # 1. Update sections with selected part IDs. my $section_attrs = $::form->{sections} || []; - my $sections = SL::DB::Manager::RequirementSpecItem->get_all(where => [ id => [ map { $_->{id} } @{ $section_attrs } ] ]); + my $sections = SL::DB::Manager::RequirementSpecItem->get_all_sorted(where => [ id => [ map { $_->{id} } @{ $section_attrs } ] ]); my %sections_by_id = map { ($_->{id} => $_) } @{ $sections }; $sections_by_id{ $_->{id} }->update_attributes(order_part_id => $_->{order_part_id}) for @{ $section_attrs }; -- 2.20.1