* In the last succeeded / job status queries, use the Builds.isCurrent
column instead of Jobs.active.
This commit is contained in:
@ -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";
|
||||
|
Reference in New Issue
Block a user