LatestSucceededForJob{,set}: Filter with jobset_id
This commit is contained in:
parent
66fbbd9692
commit
f0f41eaaff
|
@ -82,7 +82,7 @@ sub overview : Chained('job') PathPart('') Args(0) {
|
|||
# If this is an aggregate job, then get its constituents.
|
||||
my @constituents = $c->model('DB::Builds')->search(
|
||||
{ aggregate => { -in => $job->builds->search({}, { columns => ["id"], order_by => "id desc", rows => 15 })->as_query } },
|
||||
{ join => 'aggregateconstituents_constituents',
|
||||
{ join => 'aggregateconstituents_constituents',
|
||||
columns => ['id', 'job', 'finished', 'buildstatus'],
|
||||
+select => ['aggregateconstituents_constituents.aggregate'],
|
||||
+as => ['aggregate']
|
||||
|
@ -99,7 +99,7 @@ sub overview : Chained('job') PathPart('') Args(0) {
|
|||
|
||||
foreach my $agg (keys %$aggregates) {
|
||||
# FIXME: could be done in one query.
|
||||
$aggregates->{$agg}->{build} =
|
||||
$aggregates->{$agg}->{build} =
|
||||
$c->model('DB::Builds')->find({id => $agg}, {columns => [@buildListColumns]}) or die;
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ sub get_builds : Chained('job') PathPart('') CaptureArgs(0) {
|
|||
my ($self, $c) = @_;
|
||||
$c->stash->{allBuilds} = $c->stash->{job}->builds;
|
||||
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJob')
|
||||
->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name, $c->stash->{job}->name]});
|
||||
->search({}, {bind => [$c->stash->{jobset}->name, $c->stash->{job}->name]});
|
||||
$c->stash->{channelBaseName} =
|
||||
$c->stash->{project}->name . "-" . $c->stash->{jobset}->name . "-" . $c->stash->{job}->name;
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ sub get_builds : Chained('jobsetChain') PathPart('') CaptureArgs(0) {
|
|||
my ($self, $c) = @_;
|
||||
$c->stash->{allBuilds} = $c->stash->{jobset}->builds;
|
||||
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJobset')
|
||||
->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name]});
|
||||
->search({}, {bind => [$c->stash->{jobset}->name]});
|
||||
$c->stash->{channelBaseName} =
|
||||
$c->stash->{project}->name . "-" . $c->stash->{jobset}->name;
|
||||
}
|
||||
|
|
|
@ -637,8 +637,8 @@ QUERY
|
|||
|
||||
makeQueries('', "");
|
||||
makeQueries('ForProject', "and project = ?");
|
||||
makeQueries('ForJobset', "and project = ? and jobset = ?");
|
||||
makeQueries('ForJob', "and project = ? and jobset = ? and job = ?");
|
||||
makeQueries('ForJobset', "and jobset_id = (select id from jobsets j where j.name = ?)");
|
||||
makeQueries('ForJob', "and jobset_id = (select id from jobsets j where j.name = ?) and job = ?");
|
||||
|
||||
|
||||
my %hint = (
|
||||
|
|
|
@ -143,7 +143,7 @@ sub fetchInputSystemBuild {
|
|||
$jobsetName ||= $jobset->name;
|
||||
|
||||
my @latestBuilds = $db->resultset('LatestSucceededForJob')
|
||||
->search({}, {bind => [$projectName, $jobsetName, $jobName]});
|
||||
->search({}, {bind => [$jobsetName, $jobName]});
|
||||
|
||||
my @validBuilds = ();
|
||||
foreach my $build (@latestBuilds) {
|
||||
|
|
Loading…
Reference in a new issue