]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Add a "send mail to bug owners" link (under circumstances where it
authorterry%mozilla.org <>
Thu, 16 Mar 2000 05:06:02 +0000 (05:06 +0000)
committerterry%mozilla.org <>
Thu, 16 Mar 2000 05:06:02 +0000 (05:06 +0000)
seems useful and appropriate.)

buglist.cgi

index a776bbc0ba0ed541dde69aa8297a3fc79dfa71b9..b333d9b6e7d66fbb04265d186a83998b2594312d 100755 (executable)
@@ -1006,6 +1006,7 @@ my @bugarray;
 my %prodhash;
 my %statushash;
 my $buggroupset = "";
+my %ownerhash;
 
 my $pricol = -1;
 my $sevcol = -1;
@@ -1073,6 +1074,9 @@ while (@row = FetchSQLData()) {
                 if (!defined $value) {
                     next;
                 }
+                if ($c eq "owner") {
+                    $ownerhash{$value} = 1;
+                }
                 if ($::needquote{$c}) {
                     $value = html_quote($value);
                 } else {
@@ -1382,6 +1386,16 @@ if ($count > 0) {
         print "<NOBR><A HREF=\"buglist.cgi?$fields$orderpart&tweak=1\">";
         print "Change several bugs at once</A></NOBR>\n";
     }
+    my @owners = sort(keys(%ownerhash));
+    if (@owners > 1 && UserInGroup("editbugs")) {
+        my $suffix = Param('emailsuffix');
+        if ($suffix ne "") {
+            map(s/$/$suffix/, @owners);
+        }
+        my $list = join(',', @owners);
+        print qq{&nbsp;&nbsp;\n};
+        print qq{<NOBR><A HREF="mailto:$list">Send mail to bug owners</A></NOBR>\n};
+    }
     print qq{&nbsp;&nbsp;\n};
     print qq{<NOBR><A HREF="query.cgi?$::buffer">Edit this query</A></NOBR>\n};
     print "</FORM>\n";