]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 365705: Display the default CC list when listing all components of a product...
authorMatt Selsky <selsky@columbia.edu>
Thu, 17 May 2012 00:49:52 +0000 (02:49 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 17 May 2012 00:49:52 +0000 (02:49 +0200)
r/a=LpSolit

template/en/default/admin/components/list.html.tmpl

index f530b4741476ff7ee26196f52a67b6093a5e5acb..f8b0acb77c91f20f7921783d914c3701d29de7f7 100644 (file)
        name => "initialowner"
        heading => "Default Assignee"
      },
-     {
-       name => "isactive"
-       heading => "Active"
-       yesno_field => 1
-     },
    ]
 %]
 
 
 [% END %]
 
+[% columns.push({
+     name => "initial_cc_names"
+     heading => "Initial CC list"
+   },
+   {
+     name => "isactive"
+     heading => "Active"
+     yesno_field => 1
+   }) %]
+
 [% IF showbugcounts %]
 
   [% columns.push({
      contentlink => delete_contentlink
    }) %]
 
-[%# Overrides the initialowner and the initialqacontact with right values %]
+[%# Overrides the initialowner, the initialqacontact, and the initial_cc_names with right values %]
 [% overrides.initialowner = {} %]
 [% overrides.initialqacontact = {} %]
+[% overrides.initial_cc_names = {} %]
 
 [%# "component" is a reserved word in Template Toolkit. %]
 [% FOREACH my_component = product.components %]
        content => my_component.default_qa_contact.login
      }
   %]
+  [% SET initial_cc_list = [] %]
+  [% FOREACH cc_user = my_component.initial_cc %]
+    [% initial_cc_list.push(cc_user.login) %]
+  [% END %]
+  [% overrides.initial_cc_names.name.${my_component.name} = {
+       override_content => 1
+       content => initial_cc_list.join(', ')
+     }
+  %]
 [% END %]
 
 [% Hook.process('before_table') %]