diff options
author | mkanat%bugzilla.org <> | 2007-09-08 07:14:25 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2007-09-08 07:14:25 +0200 |
commit | aa888f2218179d59b4f0b8e51e43b863f1da3e43 (patch) | |
tree | 4e6bf6ff4b7066b19c5b1728dd325adf4bed1f78 /query.cgi | |
parent | 16336299f17522d040736cb0f063694381d9d761 (diff) | |
download | bugzilla-aa888f2218179d59b4f0b8e51e43b863f1da3e43.tar.gz bugzilla-aa888f2218179d59b4f0b8e51e43b863f1da3e43.tar.xz |
Bug 287330: Multi-Select Custom Fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'query.cgi')
-rwxr-xr-x | query.cgi | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -253,10 +253,21 @@ $vars->{'priority'} = get_legal_field_values('priority'); $vars->{'bug_severity'} = get_legal_field_values('bug_severity'); # Boolean charts -my @fields; -push(@fields, { name => "noop", description => "---" }); -push(@fields, $dbh->bz_get_field_defs()); -@fields = sort {lc($a->{'description'}) cmp lc($b->{'description'})} @fields; +my @fields = Bugzilla->get_fields({ obsolete => 0 }); +# Multi-selects aren't searchable, currently. +@fields = grep($_->type != FIELD_TYPE_MULTI_SELECT, @fields); + +# If we're not in the time-tracking group, exclude time-tracking fields. +if (!Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) { + foreach my $tt_field (qw(estimated_time remaining_time work_time + percentage_complete deadline)) + { + @fields = grep($_->name ne $tt_field, @fields); + } +} + +@fields = sort {lc($a->description) cmp lc($b->description)} @fields; +unshift(@fields, { name => "noop", description => "---" }); $vars->{'fields'} = \@fields; # Creating new charts - if the cmd-add value is there, we define the field |