summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-01-23 11:22:10 +0100
committerterry%mozilla.org <>2000-01-23 11:22:10 +0100
commitb078a81284bae319bead595679bec9594447b768 (patch)
tree948bc9ea14cdf0c5ac52fb0701da94e6973dbd74
parent04824af9663502bc5cc16583463c7d6819610fec (diff)
downloadbugzilla-b078a81284bae319bead595679bec9594447b768.tar.gz
bugzilla-b078a81284bae319bead595679bec9594447b768.tar.xz
Can now search for people who have added text to a bug.
-rwxr-xr-xbuglist.cgi25
-rwxr-xr-xquery.cgi11
2 files changed, 32 insertions, 4 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 181d4d066..02188e647 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -276,6 +276,9 @@ if ((defined $::FORM{'emailcc1'} && $::FORM{'emailcc1'}) ||
$query =~ s/bugs,/bugs left join cc on bugs.bug_id = cc.bug_id left join profiles ccname on cc.who = ccname.userid,/;
}
+my $needlongdescs = 0; # Whether we need to patch in the longdescs
+ # table.
+
if (defined $::FORM{'sql'}) {
$query .= "and (\n$::FORM{'sql'}\n)"
} else {
@@ -359,7 +362,8 @@ foreach my $id ("1", "2") {
my $foundone = 0;
my $lead= "and (\n";
- foreach my $field ("assigned_to", "reporter", "cc", "qa_contact") {
+ foreach my $field ("assigned_to", "reporter", "cc", "qa_contact",
+ "longdesc") {
my $doit = $::FORM{"email$field$id"};
if (!$doit) {
next;
@@ -372,12 +376,17 @@ foreach my $id ("1", "2") {
$table = "report";
} elsif ($field eq "qa_contact") {
$table = "qacont";
+ } elsif ($field eq "longdesc") {
+ $table = "longdescname";
+ $needlongdescs = 1;
} else {
$table = "ccname";
}
if ($type eq "exact") {
if ($field eq "cc") {
$query .= "\t$lead cc.who = $emailid\n";
+ } elsif ($field eq "longdesc") {
+ $query .= "\t$lead longdesc.who = $emailid\n";
} else {
$query .= "\t$lead $field = $emailid\n";
}
@@ -524,8 +533,7 @@ foreach my $f ("short_desc", "long_desc", "bug_file_loc",
my $q = SqlQuote($s);
my $type = $::FORM{$f . "_type"};
if ($f eq "long_desc") {
- # Patch in the longdescs table.
- $query =~ s/where/, longdescs where/;
+ $needlongdescs = 1; # Patch in the longdescs table.
$query .= "and longdescs.bug_id = bugs.bug_id\n";
$n = "longdescs.thetext";
}
@@ -546,6 +554,12 @@ foreach my $f ("short_desc", "long_desc", "bug_file_loc",
}
}
+if ($needlongdescs) {
+ $query =~ s/where/, longdescs left join profiles longdescname on longdescs.who = longdescname.userid where/;
+ $query .= " AND longdescs.bug_id = bugs.bug_id ";
+}
+
+
$query .= "group by bugs.bug_id\n";
@@ -585,6 +599,11 @@ if (defined $::FORM{'order'} && $::FORM{'order'} ne "") {
}
+if ($::FORM{'debug'} && $serverpush) {
+ print "<PRE>$query</PRE>\n";
+}
+
+
if (Param('expectbigqueries')) {
SendSQL("set option SQL_BIG_TABLES=1");
}
diff --git a/query.cgi b/query.cgi
index 051adee5d..27e7adbfb 100755
--- a/query.cgi
+++ b/query.cgi
@@ -75,8 +75,10 @@ foreach my $name ("bug_status", "resolution", "assigned_to", "rep_platform",
"chfieldto", "chfieldvalue",
"email1", "emailtype1", "emailreporter1",
"emailassigned_to1", "emailcc1", "emailqa_contact1",
+ "emaillongdesc1",
"email2", "emailtype2", "emailreporter2",
"emailassigned_to2", "emailcc2", "emailqa_contact2",
+ "emaillongdesc2",
"changedin", "votes", "short_desc", "short_desc_type",
"long_desc", "long_desc_type", "bug_file_loc",
"bug_file_loc_type", "status_whiteboard",
@@ -138,6 +140,7 @@ sub GenerateEmailInput {
my $assignedto = ($default{"emailassigned_to$id"} eq "1") ? "checked" : "";
my $reporter = ($default{"emailreporter$id"} eq "1") ? "checked" : "";
my $cc = ($default{"emailcc$id"} eq "1") ? "checked" : "";
+ my $longdesc = ($default{"emaillongdesc$id"} eq "1") ? "checked" : "";
my $qapart = "";
my $qacontact = "";
@@ -188,7 +191,13 @@ sub GenerateEmailInput {
<tr>
<td align=right>(Will match any of the selected fields)</td>
<td>
-<input type="checkbox" name="emailcc$id" value=1 $cc>CC &nbsp;&nbsp;
+<input type="checkbox" name="emailcc$id" value=1 $cc>CC
+</td>
+</tr>
+<tr>
+<td></td>
+<td>
+<input type="checkbox" name="emaillongdesc$id" value=1 $longdesc>Added comment
</td>
</tr>
</table>