diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index f35f5af3..6f7c2bb5 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -94,7 +94,7 @@ sub build_GET { } # Get the first eval of which this build was a part. - ($c->stash->{nrEvals}) = $c->stash->{build}->jobsetevals->search({ hasnewbuilds => 1 })->count; + ($c->stash->{nrEvals}) = $build->jobsetevals->search({ hasnewbuilds => 1 })->count; $c->stash->{eval} = getFirstEval($build); $self->status_ok( $c, @@ -107,7 +107,9 @@ sub build_GET { $c->stash->{otherEval} = $eval2 if defined $eval2; # If this is an aggregate build, get its constituents. - $c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})]; + $c->stash->{constituents} = [$build->constituents_->search({}, {order_by => ["job"]})]; + + $c->stash->{steps} = [$build->buildsteps->search({}, {order_by => "stepnr desc"})]; } diff --git a/src/root/build.tt b/src/root/build.tt index 21a756f1..31d9928f 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -6,7 +6,6 @@ [% isAggregate = constituents.size > 0; -steps = build.buildsteps.nsort('stepnr').reverse; busy = 0; FOR step IN steps; IF step.busy; busy = 1; END; END; %]