diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 6fef3ed8..77532657 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -118,6 +118,9 @@ sub build_GET { ] }) ); + + # If this is an aggregate build, get its constituents. + $c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})]; } diff --git a/src/root/build.tt b/src/root/build.tt index b58dbff1..a28463a7 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -7,7 +7,7 @@ [% project = build.project %] [% jobset = build.jobset %] [% job = build.job %] -[% isAggregate = build.constituents_ ? 1 : 0 %] +[% isAggregate = constituents ? 1 : 0 %] [% BLOCK renderOutputs %] [% start=1; FOREACH output IN outputs %] @@ -122,7 +122,7 @@ nrConstituents = 0; nrFinished = 0; nrFailedConstituents = 0; - FOREACH b IN build.constituents_; + FOREACH b IN constituents; nrConstituents = nrConstituents + 1; IF b.finished; nrFinished = nrFinished + 1; END; IF b.finished && b.buildstatus != 0; nrFailedConstituents = nrFailedConstituents + 1; END; @@ -267,7 +267,7 @@
This build is an aggregate of the following builds:
- [% INCLUDE renderBuildList builds=build.constituents_ %] + [% INCLUDE renderBuildList builds=constituents %]