use Bugzilla::Install::Requirements;
use Bugzilla::Install::Util qw(install_string template_include_path
include_languages);
+use Bugzilla::Classification;
use Bugzilla::Keyword;
use Bugzilla::Util;
use Bugzilla::Error;
'css_files' => \&css_files,
yui_resolve_deps => \&yui_resolve_deps,
+ # All classifications (sorted by sortkey, name)
+ 'all_classifications' => sub {
+ return [map { $_->name } Bugzilla::Classification->get_all()];
+ },
+
# Whether or not keywords are enabled, in this Bugzilla.
'use_keywords' => sub { return Bugzilla::Keyword->any_exist; },
[% END %]
[% END %]
[% END %]
- [% FOREACH c = classifications.keys.sort %]
- <optgroup label="[% c FILTER html %]">
+
+ [% FOREACH c = all_classifications %]
+ [% NEXT UNLESS classifications.${c}.size %]
+ <optgroup label="[% c FILTER html %]">
[% FOREACH p = classifications.$c %]
<option value="[% p.$valueattribute FILTER html %]"
[% " selected" IF (cgi.param(name) == p.name) || (value.contains(p.name)) %]>