]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1321595 - Add triage owner to the needinfo suggestion dropdown
authorDylan William Hardison <dylan@hardison.net>
Tue, 4 Apr 2017 20:58:43 +0000 (16:58 -0400)
committerDylan William Hardison <dylan@hardison.net>
Tue, 4 Apr 2017 20:58:59 +0000 (16:58 -0400)
Bugzilla/Component.pm
extensions/Needinfo/Extension.pm
extensions/Needinfo/template/en/default/bug/needinfo.html.tmpl

index 68024c2fa81541ca0e9a5287fb270e8c403981cf..10da7137bbbb2c6f980be888b8b42b03b0b1483a 100644 (file)
@@ -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 #
 ##############################################
index 0c8c88a87d791233c5236e5d69abfc38dfb8d368..3b99b5a448c4db53b1ab712c37061c524c868143 100644 (file)
@@ -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
index 5b316e4b03049f1adc204167647ccece66c8c009..111d8885a2547fb652e3d0ffd4c03e6afa0c3698 100644 (file)
@@ -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