diff options
author | lpsolit%gmail.com <> | 2008-04-20 14:49:44 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-04-20 14:49:44 +0000 |
commit | aea95887f82a6066ebadb99068d94ef05087909b (patch) | |
tree | 6434d160002a9d337937761e25bd5f84049b24b3 /config.cgi | |
parent | Bug 429768 - show_bug_flags is needlessly set twice in edit.html.tmpl (diff) | |
download | bugzilla-aea95887f82a6066ebadb99068d94ef05087909b.tar.gz bugzilla-aea95887f82a6066ebadb99068d94ef05087909b.tar.bz2 bugzilla-aea95887f82a6066ebadb99068d94ef05087909b.zip |
Bug 429847: config.cgi should include additional information about custom fields - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'config.cgi')
-rwxr-xr-x | config.cgi | 7 |
1 files changed, 6 insertions, 1 deletions
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); |