aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2002-11-22 10:38:18 +0000
committerbugreport%peshkin.net <>2002-11-22 10:38:18 +0000
commitf97a2e07e995a41196c26ba8ecb77e0d5806f95d (patch)
tree058cb50bd462d6c7f6c53ac0d57e84b46e50bc5a
parent1e400dc0114d167a38d37842e6165b9c34d7c8d9 (diff)
downloadbugs-f97a2e07e995a41196c26ba8ecb77e0d5806f95d.tar
bugs-f97a2e07e995a41196c26ba8ecb77e0d5806f95d.tar.gz
bugs-f97a2e07e995a41196c26ba8ecb77e0d5806f95d.tar.bz2
bugs-f97a2e07e995a41196c26ba8ecb77e0d5806f95d.tar.xz
bugs-f97a2e07e995a41196c26ba8ecb77e0d5806f95d.zip
Bug 180980 Doing 2 email searches fails when searching for CC list members
Patch by bugreport@peshkin.net r=myk, a=justdave
-rw-r--r--Bugzilla/Search.pm29
1 files changed, 21 insertions, 8 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 3ac654ccc..04e797593 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -287,6 +287,7 @@ sub init {
}
my $chartid;
+ my $sequence = 0;
# $type_id is used by the code that queries for attachment flags.
my $type_id = 0;
my $f;
@@ -312,23 +313,35 @@ sub init {
"^cc,(anyexact|substring)" => sub {
my $list;
$list = $self->ListIDsForEmail($t, $v);
+ my $chartseq;
+ $chartseq = $chartid;
+ if ($chartid eq "") {
+ $chartseq = "CC$sequence";
+ $sequence++;
+ }
if ($list) {
- push(@supptables, "LEFT JOIN cc cc_$chartid ON bugs.bug_id = cc_$chartid.bug_id AND cc_$chartid.who IN($list)");
- $term = "cc_$chartid.who IS NOT NULL";
+ push(@supptables, "LEFT JOIN cc cc_$chartseq ON bugs.bug_id = cc_$chartseq.bug_id AND cc_$chartseq.who IN($list)");
+ $term = "cc_$chartseq.who IS NOT NULL";
} else {
- push(@supptables, "LEFT JOIN cc cc_$chartid ON bugs.bug_id = cc_$chartid.bug_id");
+ push(@supptables, "LEFT JOIN cc cc_$chartseq ON bugs.bug_id = cc_$chartseq.bug_id");
- push(@supptables, "LEFT JOIN profiles map_cc_$chartid ON cc_$chartid.who = map_cc_$chartid.userid");
- $ff = $f = "map_cc_$chartid.login_name";
+ push(@supptables, "LEFT JOIN profiles map_cc_$chartseq ON cc_$chartseq.who = map_cc_$chartseq.userid");
+ $ff = $f = "map_cc_$chartseq.login_name";
my $ref = $funcsbykey{",anyexact"};
&$ref;
}
},
"^cc," => sub {
- push(@supptables, "LEFT JOIN cc cc_$chartid ON bugs.bug_id = cc_$chartid.bug_id");
+ my $chartseq;
+ $chartseq = $chartid;
+ if ($chartid eq "") {
+ $chartseq = "CC$sequence";
+ $sequence++;
+ }
+ push(@supptables, "LEFT JOIN cc cc_$chartseq ON bugs.bug_id = cc_$chartseq.bug_id");
- push(@supptables, "LEFT JOIN profiles map_cc_$chartid ON cc_$chartid.who = map_cc_$chartid.userid");
- $f = "map_cc_$chartid.login_name";
+ push(@supptables, "LEFT JOIN profiles map_cc_$chartseq ON cc_$chartseq.who = map_cc_$chartseq.userid");
+ $f = "map_cc_$chartseq.login_name";
},
"^long_?desc,changedby" => sub {