From 589271bd72a833fd153ff390882b977e66f0d047 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Nov 2013 14:53:52 +0100 Subject: [PATCH] In the "My jobs" tab, ignore disabled projects/jobsets --- src/lib/Hydra/Controller/User.pm | 6 +++++- src/root/dashboard-my-jobs-tab.tt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Controller/User.pm b/src/lib/Hydra/Controller/User.pm index 4b6033a8..7ddfb6e8 100644 --- a/src/lib/Hydra/Controller/User.pm +++ b/src/lib/Hydra/Controller/User.pm @@ -302,8 +302,12 @@ sub my_jobs_tab :Chained('user') :PathPart('my-jobs-tab') :Args(0) { $c->stash->{builds} = [$c->model('DB::Builds')->search( { iscurrent => 1 , maintainers => { ilike => "%" . $c->stash->{user}->emailaddress . "%" } + , "project.enabled" => 1 + , "jobset.enabled" => 1 }, - { order_by => ["project", "jobset", "job"] })]; + { order_by => ["project", "jobset", "job"] + , join => ["project", "jobset"] + })]; } diff --git a/src/root/dashboard-my-jobs-tab.tt b/src/root/dashboard-my-jobs-tab.tt index 9e15cd7d..6dee16b5 100644 --- a/src/root/dashboard-my-jobs-tab.tt +++ b/src/root/dashboard-my-jobs-tab.tt @@ -9,7 +9,7 @@ [% ELSE %] -

Below is the most recent build of every job of which you +

Below are the most recent builds of the [% builds.size %] jobs of which you ([% HTML.escape(user.emailaddress) %]) are a maintainer.

[% INCLUDE renderBuildList %]