Index: mozilla/webtools/bugzilla/Bugzilla/Search.pm =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search.pm,v retrieving revision 1.146 diff -pu -r1.146 mozilla/webtools/bugzilla/Bugzilla/Search.pm --- mozilla/webtools/bugzilla/Bugzilla/Search.pm +++ mozilla/webtools/bugzilla/Bugzilla/Search.pm @@ -445,10 +445,10 @@ sub init { } }, "^(?:assigned_to|reporter|qa_contact),(?:equals|anyexact),(%\\w+%)" => sub { - $term = "bugs.$f = " . pronoun($1, $user); + $term = "bugs.$f = " . pronoun($1, $user, @supptables); }, "^(?:assigned_to|reporter|qa_contact),(?:notequals),(%\\w+%)" => sub { - $term = "bugs.$f <> " . pronoun($1, $user); + $term = "bugs.$f <> " . pronoun($1, $user, @supptables); }, "^(assigned_to|reporter),(?!changed)" => sub { my $real_f = $f; @@ -492,7 +492,7 @@ sub init { }, "^cc,(?:equals|anyexact),(%\\w+%)" => sub { - my $match = pronoun($1, $user); + my $match = pronoun($1, $user, @supptables); my $chartseq = $chartid; if ($chartid eq "") { $chartseq = "CC$sequence"; @@ -504,7 +504,7 @@ sub init { $term = "cc_$chartseq.who IS NOT NULL"; }, "^cc,(?:notequals),(%\\w+%)" => sub { - my $match = pronoun($1, $user); + my $match = pronoun($1, $user, @supptables); my $chartseq = $chartid; if ($chartid eq "") { $chartseq = "CC$sequence"; @@ -617,7 +617,7 @@ sub init { $q = $dbh->quote($v); }, "^commenter,(?:equals|anyexact),(%\\w+%)" => sub { - my $match = pronoun($1, $user); + my $match = pronoun($1, $user, @supptables); my $chartseq = $chartid; if ($chartid eq "") { $chartseq = "LD$sequence"; @@ -1574,7 +1574,7 @@ sub getDebugData { } sub pronoun { - my ($noun, $user) = (@_); + my ($noun, $user, @supptables) = (@_); if ($noun eq "%user%") { if ($user->id) { return $user->id; @@ -1591,6 +1591,16 @@ sub pronoun { if ($noun eq "%qacontact%") { return "bugs.qa_contact"; } + if ($noun eq "%defaultowner%") { + push @supptables, "LEFT JOIN components ON " . + "components.id = bugs.component_id"; + return "components.initialowner"; + } + if ($noun eq "%defaultqacontact%") { + push @supptables, "LEFT JOIN components ON " . + "components.id = bugs.component_id"; + return "components.initialqacontact"; + } return 0; }