From 746bdf1db9c10d1e5fc8fc66a0ce876aa29f92da Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 4 Apr 2017 16:58:43 -0400 Subject: Bug 1321595 - Add triage owner to the needinfo suggestion dropdown --- Bugzilla/Component.pm | 2 ++ extensions/Needinfo/Extension.pm | 5 +++++ extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl | 3 +++ 3 files changed, 10 insertions(+) diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm index 68024c2fa..10da7137b 100644 --- a/Bugzilla/Component.pm +++ b/Bugzilla/Component.pm @@ -438,6 +438,8 @@ sub description { return $_[0]->{'description'}; } sub product_id { return $_[0]->{'product_id'}; } sub is_active { return $_[0]->{'isactive'}; } +sub triage_owner_id { return $_[0]->{'triage_owner_id'} } + ############################################## # Implement Bugzilla::Field::ChoiceInterface # ############################################## diff --git a/extensions/Needinfo/Extension.pm b/extensions/Needinfo/Extension.pm index 0c8c88a87..3b99b5a44 100644 --- a/extensions/Needinfo/Extension.pm +++ b/extensions/Needinfo/Extension.pm @@ -134,6 +134,11 @@ sub bug_start_of_update { elsif ($needinfo_role eq 'user') { $requestees{$user->login} = 1; } + elsif ($needinfo_role eq 'triage_owner') { + if ($bug->component_obj->triage_owner_id) { + $requestees{$bug->component_obj->triage_owner->login} = 1; + } + } # Use user specified requestee elsif ($needinfo_role eq 'other' && $needinfo_from) { my @needinfo_from_list = ref $needinfo_from diff --git a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl index 5b316e4b0..111d8885a 100644 --- a/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl +++ b/extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl @@ -218,6 +218,9 @@ $(function() { [% available_mentors.size == 1 ? "mentor" : mentor.login FILTER html %] [% END %] + [% IF bug.component_obj.triage_owner_id %] + + [% END %] [% INCLUDE global/userselect.html.tmpl -- cgit v1.2.3-24-g4f1b