* In the last succeeded / job status queries, use the Builds.isCurrent

column instead of Jobs.active.
This commit is contained in:
Eelco Dolstra
2009-10-07 15:45:17 +00:00
parent 48d8871dbc
commit 16f2d003b2
7 changed files with 16 additions and 21 deletions

View File

@ -7,25 +7,11 @@ use Hydra::Helper::Nix;
use Hydra::Helper::CatalystUtils;
sub filterInactiveJobs {
my ($build) = @_;
return $build->search(
{ active => 1 },
{ join => 'job'
, '+select' => ["job.active"]
, '+as' => ["active"]
});
}
sub getJobStatus {
my ($self, $c) = @_;
my $latest = joinWithResultInfo($c, $c->stash->{jobStatus});
$latest = filterInactiveJobs($latest)
unless defined $c->stash->{showInactiveJobs};
$latest = $latest->search(
{},
{ '+select' => ["me.statusChangeId", "me.statusChangeTime"]
@ -90,7 +76,7 @@ sub nix : Chained('get_builds') PathPart('channel') CaptureArgs(1) {
eval {
if ($channelName eq "latest") {
$c->stash->{channelName} = $c->stash->{channelBaseName} . "-latest";
getChannelData($c, scalar(filterInactiveJobs($c->stash->{latestSucceeded})));
getChannelData($c, scalar($c->stash->{latestSucceeded}));
}
elsif ($channelName eq "all") {
$c->stash->{channelName} = $c->stash->{channelBaseName} . "-all";