From 6551d2d054286ad5d1edc6471be66e50238d7530 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" Date: Fri, 25 Feb 2005 03:40:03 +0000 Subject: [PATCH] Bug 264192: Fix search where BugsThisDependsOn or OtherBugsDependingOnThis is empty Patch by Joel Peshkin r=mkanat, a=myk --- webtools/bugzilla/Bugzilla/Search.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/webtools/bugzilla/Bugzilla/Search.pm b/webtools/bugzilla/Bugzilla/Search.pm index aedb2b2b4b5..ff9befa289c 100644 --- a/webtools/bugzilla/Bugzilla/Search.pm +++ b/webtools/bugzilla/Bugzilla/Search.pm @@ -881,20 +881,24 @@ sub init { "^dependson,(?!changed)" => sub { my $table = "dependson_" . $chartid; - push(@supptables, "dependencies $table"); $ff = "$table.$f"; my $ref = $funcsbykey{",$t"}; &$ref; - push(@wherepart, "$table.blocked = bugs.bug_id"); + push(@supptables, "LEFT JOIN dependencies $table " . + "ON $table.blocked = bugs.bug_id " . + "AND ($term)"); + $term = "$ff IS NOT NULL"; }, "^blocked,(?!changed)" => sub { my $table = "blocked_" . $chartid; - push(@supptables, "dependencies $table"); $ff = "$table.$f"; my $ref = $funcsbykey{",$t"}; &$ref; - push(@wherepart, "$table.dependson = bugs.bug_id"); + push(@supptables, "LEFT JOIN dependencies $table " . + "ON $table.dependson = bugs.bug_id " . + "AND ($term)"); + $term = "$ff IS NOT NULL"; }, "^alias,(?!changed)" => sub {