summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-05-26 15:51:52 +0200
committerbugreport%peshkin.net <>2004-05-26 15:51:52 +0200
commit807c816305af7ff71b4d243d747e296e6b15fd3f (patch)
treeeee986f2b503730d1bcf8cf46c52680efcb84e66 /Bugzilla
parentdefc9c9891e496503f61d011a1cdd3ccdcbea54b (diff)
downloadbugzilla-807c816305af7ff71b4d243d747e296e6b15fd3f.tar.gz
bugzilla-807c816305af7ff71b4d243d747e296e6b15fd3f.tar.xz
Bug 244650: Fix query on commentor in combination with other email-based criteria
r=justdave a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm44
1 files changed, 27 insertions, 17 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 6d3c7c916..241439cf5 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -200,22 +200,7 @@ sub init {
}
}
if ($params->param("emaillongdesc$id")) {
- if (my $list = $self->ListIDsForEmail($type, $email)) {
- my $table = "longdescs_email_$id";
- push(@supptables, "LEFT JOIN longdescs $table ON bugs.bug_id = $table.bug_id AND $table.who IN($list)");
- push(@wherepart, "$table.who IS NOT NULL");
- # push something into @clist so that we don't trigger
- # the missing_email_type error below
- push(@clist, 'noop');
- } else {
- my $table = "longdescs_email_$id";
- push(@supptables, "longdescs $table");
- push(@wherepart, "$table.bug_id = bugs.bug_id");
- my $ptable = "longdescnames_email_$id";
- push(@supptables, "profiles $ptable");
- push(@wherepart, "$table.who = $ptable.userid");
- push(@clist, "$ptable.login_name", $type, $email);
- }
+ push(@clist, "commenter", $type, $email);
}
if (@clist) {
push(@specialchart, \@clist);
@@ -457,6 +442,31 @@ sub init {
push(@fields, $select_term);
}
},
+ "^commenter," => sub {
+ my $chartseq;
+ my $list;
+ $list = $self->ListIDsForEmail($t, $v);
+ $chartseq = $chartid;
+ if ($chartid eq "") {
+ $chartseq = "LD$sequence";
+ $sequence++;
+ }
+ my $table = "longdescs_$chartseq";
+ my $extra = "";
+ if (Param("insidergroup") && !&::UserInGroup(Param("insidergroup"))) {
+ $extra = "AND $table.isprivate < 1";
+ }
+ if ($list) {
+ push(@supptables, "LEFT JOIN longdescs $table ON $table.bug_id = bugs.bug_id $extra AND $table.who IN ($list)");
+ $term = "$table.who IS NOT NULL";
+ } else {
+ push(@supptables, "LEFT JOIN longdescs $table ON $table.bug_id = bugs.bug_id $extra");
+ push(@supptables, "LEFT JOIN profiles map_$table ON $table.who = map_$table.userid");
+ $ff = $f = "map_$table.login_name";
+ my $ref = $funcsbykey{",$t"};
+ &$ref;
+ }
+ },
"^long_?desc," => sub {
my $table = "longdescs_$chartid";
push(@supptables, "longdescs $table");
@@ -1100,7 +1110,7 @@ sub SqlifyDate {
# ListIDsForEmail returns a string with a comma-joined list
# of userids matching email addresses
# according to the type specified.
-# Currently, this only supports anyexact and substring matches.
+# Currently, this only supports exact, anyexact, and substring matches.
# Substring matches will return up to 50 matching userids
# If a match type is unsupported or returns too many matches,
# ListIDsForEmail returns an undef.