]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 264192: Fix search where BugsThisDependsOn or OtherBugsDependingOnThis is empty
authorbugreport%peshkin.net <>
Fri, 25 Feb 2005 11:40:03 +0000 (11:40 +0000)
committerbugreport%peshkin.net <>
Fri, 25 Feb 2005 11:40:03 +0000 (11:40 +0000)
Patch by Joel Peshkin <bugreport@peshkin.net> r=mkanat, a=myk

Bugzilla/Search.pm

index aedb2b2b4b50f2dee59c9e148a2dae236ffa7b9a..ff9befa289c400a4915b736c24a27814af83fd62 100644 (file)
@@ -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 {