* In the job status and error pages, show when the status of a job

last changed.
This commit is contained in:
Eelco Dolstra
2009-07-09 14:48:15 +00:00
parent bbf718e64d
commit 1aec78014d
7 changed files with 53 additions and 12 deletions

View File

@ -14,7 +14,7 @@ sub filterInactiveJobs {
{ join => 'job'
, '+select' => ["job.active"]
, '+as' => ["active"]
})
});
}
@ -26,6 +26,13 @@ sub getJobStatus {
$latest = filterInactiveJobs($latest)
unless defined $c->stash->{showInactiveJobs};
$latest = $latest->search(
{},
{ '+select' => ["me.statusChangeId", "me.statusChangeTime"]
, '+as' => ["statusChangeId", "statusChangeTime"]
, order_by => "statusChangeTime DESC"
});
return $latest;
}
@ -49,7 +56,7 @@ sub errors : Chained('get_builds') PathPart Args(0) {
[$c->stash->{allJobs}->search({errormsg => {'!=' => ''}})]
if defined $c->stash->{allJobs};
$c->stash->{brokenBuilds} =
[getJobStatus($self, $c)->search({buildstatus => {'!=' => 0}})];
[getJobStatus($self, $c)->search({'me.buildstatus' => {'!=' => 0}})];
}