Don't show duplicate builds in "Related builds"
Since a build may be a member of multiple jobset evaluations, we need to do a "select distinct" here. But maybe we should only show builds from a single evaluation (e.g. the most recent), since showing builds from several may be confusing.
This commit is contained in:
parent
2cf9b148eb
commit
578530dac2
|
@ -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];
|
||||
|
|
|
@ -437,6 +437,7 @@
|
|||
<div id="tabs-relatedbuilds">
|
||||
|
||||
<h2>Related builds</h2>
|
||||
<p>The following builds are part of the same jobset evaluation that produced this build.</p>
|
||||
[% INCLUDE renderBuildList builds=relatedbuilds%]
|
||||
</div>
|
||||
[% END %]
|
||||
|
|
Loading…
Reference in a new issue