summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-04-04 22:58:43 +0200
committerDylan William Hardison <dylan@hardison.net>2017-04-04 22:58:59 +0200
commit746bdf1db9c10d1e5fc8fc66a0ce876aa29f92da (patch)
tree51a766d5e4732ae88707152e11e785bc90d5e266
parentb9d6d8634866ab5687eafbdda4159b39aae392ff (diff)
downloadbugzilla-746bdf1db9c10d1e5fc8fc66a0ce876aa29f92da.tar.gz
bugzilla-746bdf1db9c10d1e5fc8fc66a0ce876aa29f92da.tar.xz
Bug 1321595 - Add triage owner to the needinfo suggestion dropdown
-rw-r--r--Bugzilla/Component.pm2
-rw-r--r--extensions/Needinfo/Extension.pm5
-rw-r--r--extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl3
3 files changed, 10 insertions, 0 deletions
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 %]
</option>
[% END %]
+ [% IF bug.component_obj.triage_owner_id %]
+ <option value="triage_owner">triage owner</option>
+ [% END %]
</select>
<span id="needinfo_from_container">
[% INCLUDE global/userselect.html.tmpl