From aea95887f82a6066ebadb99068d94ef05087909b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 20 Apr 2008 14:49:44 +0000 Subject: Bug 429847: config.cgi should include additional information about custom fields - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.cgi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'config.cgi') diff --git a/config.cgi b/config.cgi index 026b070d6..ebdf71241 100755 --- a/config.cgi +++ b/config.cgi @@ -87,7 +87,12 @@ $vars->{'open_status'} = \@open_status; $vars->{'closed_status'} = \@closed_status; # Generate a list of fields that can be queried. -$vars->{'field'} = [Bugzilla->dbh->bz_get_field_defs()]; +my @fields = @{Bugzilla::Field->match({obsolete => 0})}; +# Exclude fields the user cannot query. +if (!Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) { + @fields = grep { $_->name !~ /^(estimated_time|remaining_time|work_time|percentage_complete|deadline)$/ } @fields; +} +$vars->{'field'} = \@fields; display_data($vars); -- cgit v1.2.3-24-g4f1b