From: Moritz Bunkus Date: Thu, 10 Apr 2014 10:47:22 +0000 (+0200) Subject: Pflichtenheft -> Angebot/Auftrag: Positionen in richtiger Reihenfolge anlegen X-Git-Tag: release-3.2.0beta~467^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c4ce237aaab9c25c41334c30852d2ea640730efe;p=kivitendo-erp.git Pflichtenheft -> Angebot/Auftrag: Positionen in richtiger Reihenfolge anlegen …und zwar in der Reihenfolge, in der die Abschnitte im Pflichtenheft angeordnet sind. --- 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 };