summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
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 /buglist.cgi
parent04824af9663502bc5cc16583463c7d6819610fec (diff)
downloadbugzilla-b078a81284bae319bead595679bec9594447b768.tar.gz
bugzilla-b078a81284bae319bead595679bec9594447b768.tar.xz
Can now search for people who have added text to a bug.
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi25
1 files changed, 22 insertions, 3 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");
}