diff options
author | lpsolit%gmail.com <> | 2008-04-20 16:49:44 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-04-20 16:49:44 +0200 |
commit | aea95887f82a6066ebadb99068d94ef05087909b (patch) | |
tree | 6434d160002a9d337937761e25bd5f84049b24b3 /config.cgi | |
parent | 6851239b32ae7dff2252e8b0928bd1bfd7142c08 (diff) | |
download | bugzilla-aea95887f82a6066ebadb99068d94ef05087909b.tar.gz bugzilla-aea95887f82a6066ebadb99068d94ef05087909b.tar.xz |
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); |