From: Kohei Yoshino Date: Fri, 10 May 2019 20:49:42 +0000 (-0400) Subject: Bug 1541618 - Add triage owner to edit components view columns. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fda41984be6631ae11e0eb09a6a63ae9bc6c3f3c;p=thirdparty%2Fbugzilla.git Bug 1541618 - Add triage owner to edit components view columns. --- diff --git a/extensions/ComponentWatching/template/en/default/hook/admin/components/list-before_table.html.tmpl b/extensions/ComponentWatching/template/en/default/hook/admin/components/list-before_table.html.tmpl deleted file mode 100644 index ed8d6e350..000000000 --- a/extensions/ComponentWatching/template/en/default/hook/admin/components/list-before_table.html.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -[%# This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - # - # This Source Code Form is "Incompatible With Secondary Licenses", as - # defined by the Mozilla Public License, v. 2.0. - #%] - -[% CALL columns.splice(5, 0, { name => 'watch_user', heading => 'Watch User' }) %] - -[% FOREACH my_component = product.components %] - [% overrides.watch_user.name.${my_component.name} = { - override_content => 1 - content => my_component.watch_user.login - } - %] -[% END %] diff --git a/template/en/default/admin/components/list.html.tmpl b/template/en/default/admin/components/list.html.tmpl index aca4c95a7..4fa7683ea 100644 --- a/template/en/default/admin/components/list.html.tmpl +++ b/template/en/default/admin/components/list.html.tmpl @@ -52,6 +52,11 @@ heading => "Description" allow_html_content => 1 }, + { + name => "isactive" + heading => "Active" + yesno_field => 1 + }, { name => "default_bug_type" heading => "Default $terms.Bug Type" @@ -61,9 +66,8 @@ heading => "Default Assignee" }, { - name => "isactive" - heading => "Active" - yesno_field => 1 + name => "triage_owner" + heading => "Triage Owner" }, ] %] @@ -96,19 +100,27 @@ [%# Overrides the initialowner and the initialqacontact with right values %] [% overrides.initialowner = {} %] +[% overrides.triage_owner = {} %] [% overrides.initialqacontact = {} %] [%# "component" is a reserved word in Template Toolkit. %] [% FOREACH my_component = product.components %] - [% overrides.initialowner.name.${my_component.name} = { - override_content => 1 - content => my_component.default_assignee.login - } - %] - [% overrides.initialqacontact.name.${my_component.name} = { - override_content => 1 - content => my_component.default_qa_contact.login - } + [% + users = [ + { field_name => 'default_assignee', column_name => 'initialowner' }, + { field_name => 'triage_owner', column_name => 'triage_owner' }, + { field_name => 'default_qa_contact', column_name => 'initialqacontact' }, + ]; + FOREACH user IN users; + email = my_component.${user.field_name}.login; + IF (email.match('^nobody@') || email.match('\.bugs$')); + email = ''; + END; + overrides.${user.column_name}.name.${my_component.name} = { + override_content => 1, + content => email || '(nobody)', + }; + END; %] [% END %]