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:
@ -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];
|
||||
|
Reference in New Issue
Block a user