summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-07-29 09:46:57 +0200
committerbugreport%peshkin.net <>2004-07-29 09:46:57 +0200
commit1176bd8d61a55297707bf28810a9fcea06e82ec5 (patch)
tree0a24afcefd29b40e3346d4e3eaec204c5f606caf /Bugzilla/Search.pm
parent443ba65dcc14aae3278c4f5f152f942f87bc4f08 (diff)
downloadbugzilla-1176bd8d61a55297707bf28810a9fcea06e82ec5.tar.gz
bugzilla-1176bd8d61a55297707bf28810a9fcea06e82ec5.tar.xz
Bug 204903: Enable searches to match NULL aliases, missing qa_contact, and search on CC even when cc-list is empty
r=jouni a=myk
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r--Bugzilla/Search.pm19
1 files changed, 16 insertions, 3 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 49f32fdf8..00b213d54 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -344,7 +344,7 @@ sub init {
"^qa_contact," => sub {
push(@supptables,
"LEFT JOIN profiles map_qa_contact ON bugs.qa_contact = map_qa_contact.userid");
- $f = "map_$f.login_name";
+ $f = "COALESCE(map_$f.login_name,'')";
},
"^cc,(?:equals|anyexact),(%\\w+%)" => sub {
@@ -399,8 +399,15 @@ sub init {
}
push(@supptables, "LEFT JOIN cc cc_$chartseq ON bugs.bug_id = cc_$chartseq.bug_id");
- push(@supptables, "LEFT JOIN profiles map_cc_$chartseq ON cc_$chartseq.who = map_cc_$chartseq.userid");
- $f = "map_cc_$chartseq.login_name";
+ $ff = $f = "map_cc_$chartseq.login_name";
+ my $ref = $funcsbykey{",$t"};
+ &$ref;
+ push(@supptables,
+ "LEFT JOIN profiles map_cc_$chartseq " .
+ "ON (cc_$chartseq.who = map_cc_$chartseq.userid " .
+ "AND ($term))"
+ );
+ $term = "$f IS NOT NULL";
},
"^long_?desc,changedby" => sub {
@@ -759,6 +766,12 @@ sub init {
push(@wherepart, "$table.dependson = bugs.bug_id");
},
+ "^alias," => sub {
+ $ff = "COALESCE(bugs.alias, '')";
+ my $ref = $funcsbykey{",$t"};
+ &$ref;
+ },
+
"^owner_idle_time,(greaterthan|lessthan)" => sub {
my $table = "idle_" . $chartid;
$v =~ /^(\d+)\s*([hHdDwWmMyY])?$/;