* Use isCurrent to determine the inactive jobs.

This commit is contained in:
Eelco Dolstra 2009-10-08 08:54:42 +00:00
parent 16f2d003b2
commit 08f3b7bf2a
2 changed files with 11 additions and 3 deletions

View file

@ -28,8 +28,16 @@ sub index : Chained('jobset') PathPart('') Args(0) {
getBuildStats($c, scalar $c->stash->{jobset}->builds);
$c->stash->{activeJobs} = [$c->stash->{jobset}->builds->search({isCurrent => 1}, {select => ["job"], distinct => 1})];
$c->stash->{inactiveJobs} = [$c->stash->{jobset}->jobs->search({active => 0})];
$c->stash->{activeJobs} = [
$c->stash->{jobset}->builds->search(
{isCurrent => 1},
{select => ["job"], order_by => ["job"], distinct => 1}
)];
$c->stash->{inactiveJobs} = [
$c->stash->{jobset}->builds->search(
{},
{select => ["job"], order_by => ["job"], group_by => ["job"], having => { 'sum(isCurrent)' => 0 }}
)];
}

View file

@ -126,7 +126,7 @@
<blockquote>
[% IF inactiveJobs.size == 0 %]<em>(none)</em>[% END %]
[% FOREACH j IN inactiveJobs %] [% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.name %] [% END %]
[% FOREACH j IN inactiveJobs %] [% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.get_column('job') %] [% END %]
</blockquote>
</p>