]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 557183: In config.cgi, specify if fields controlled by a parameter are enabled...
authorFrank Becker <Frank@Frank-Becker.de>
Thu, 9 Aug 2012 21:32:25 +0000 (23:32 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 9 Aug 2012 21:32:25 +0000 (23:32 +0200)
r/a=LpSolit

config.cgi
template/en/default/config.rdf.tmpl

index bb6a47349c49d5a933030e4f8b61d3611f844507..7dc2e3afb3f5239f627c978898f652688f25b47a 100755 (executable)
@@ -107,6 +107,18 @@ my @fields = @{Bugzilla::Field->match({obsolete => 0})};
 if (!$user->is_timetracker) {
     @fields = grep { $_->name !~ /^(estimated_time|remaining_time|work_time|percentage_complete|deadline)$/ } @fields;
 }
+
+my %FIELD_PARAMS = (
+    classification    => 'useclassification',
+    target_milestone  => 'usetargetmilestone',
+    qa_contact        => 'useqacontact',
+    status_whiteboard => 'usestatuswhiteboard',
+    see_also          => 'use_see_also',
+);
+foreach my $field (@fields) {
+    my $param = $FIELD_PARAMS{$field->name};
+    $field->{is_active} =  Bugzilla->params->{$param} if $param;
+}
 $vars->{'field'} = \@fields;
 
 display_data($vars);
index afc511054df64c652a8d1f859f72727f6a0cb708..353cecf52ecc54aa752870040c4eed488959a902 100644 (file)
               <bz:type_desc>[% field_types.${item.type} FILTER html %]</bz:type_desc>
               <bz:enter_bug>[% item.enter_bug FILTER html %]</bz:enter_bug>
             [% END %]
+            [% IF item.is_active.defined %]
+              <bz:is_active>[% item.is_active FILTER html %]</bz:is_active>
+            [% END %]
           </bz:field>
         </li>
       [% END %]