diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 8eec30f9..d09e6129 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -83,7 +83,7 @@ sub view_build : Chained('build') PathPart('') Args(0) { my $r = joinWithResultInfo( $c, $c->model('DB::Builds'))->search( { eval => { -in => $build->jobsetevalmembers->get_column('eval')->as_query } } - , { join => 'jobsetevalmembers', order_by => [ 'project', 'jobset', 'job'] } + , { join => 'jobsetevalmembers', order_by => [ 'project', 'jobset', 'job'], distinct => 1 } ); if ($r->count <= 100) { $c->stash->{relatedbuilds} = [$r->all]; diff --git a/src/root/build.tt b/src/root/build.tt index e3d5b88f..ee704fb8 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -437,6 +437,7 @@

Related builds

+

The following builds are part of the same jobset evaluation that produced this build.

[% INCLUDE renderBuildList builds=relatedbuilds%]
[% END %]