hydra: in jobstatus pages, allow maintainer query argument to show only the packages you are maintaining

This commit is contained in:
Rob Vermaas 2010-09-08 06:37:19 +00:00
parent 526ffb7eef
commit 822ca9c29e

View file

@ -12,8 +12,10 @@ sub getJobStatus {
my $latest = joinWithResultInfo($c, $c->stash->{jobStatus});
my $maintainer = $c->request->params->{"maintainer"};
$latest = $latest->search(
{},
defined $maintainer ? { maintainers => { like => "%$maintainer%" } } : {},
{ '+select' => ["me.statusChangeId", "me.statusChangeTime"]
, '+as' => ["statusChangeId", "statusChangeTime"]
, order_by => "coalesce(statusChangeTime, 0) desc"
@ -22,7 +24,6 @@ sub getJobStatus {
return $latest;
}
sub jobstatus : Chained('get_builds') PathPart Args(0) {
my ($self, $c) = @_;
$c->stash->{template} = 'jobstatus.tt';