diff options
author | lpsolit%gmail.com <> | 2006-08-16 08:25:49 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-08-16 08:25:49 +0200 |
commit | fac8f987518be89eb1fc14e8ee082b9ea00fce39 (patch) | |
tree | a37736a96496f42efb9317943b883d784e487ab4 /Bugzilla | |
parent | b78fb46e51ed00ac352b3f72f2ba9ee50ad17101 (diff) | |
download | bugzilla-fac8f987518be89eb1fc14e8ee082b9ea00fce39.tar.gz bugzilla-fac8f987518be89eb1fc14e8ee082b9ea00fce39.tar.xz |
Bug 276232: "Bug Changes": selecting "bug creation" OR "status" (changed in date range) only returns "status" results - Patch by Todd Stansell <tjs@tellme.com> r=joel a=myk
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Search.pm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 673deaa30..b65bb6733 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -303,6 +303,7 @@ sub init { } else { my $bug_creation_clause; my @list; + my @actlist; foreach my $f (@chfield) { if ($f eq "[Bug creation]") { # Treat [Bug creation] differently because we need to look @@ -312,14 +313,15 @@ sub init { push(@l, "bugs.creation_ts <= $sql_chto") if($sql_chto); $bug_creation_clause = "(" . join(' AND ', @l) . ")"; } else { - push(@list, "\nactcheck.fieldid = " . get_field_id($f)); + push(@actlist, "actcheck.fieldid = " . get_field_id($f)); } } - # @list won't have any elements if the only field being searched + # @actlist won't have any elements if the only field being searched # is [Bug creation] (in which case we don't need bugs_activity). - if(@list) { - my $extra = ""; + if(@actlist) { + my $extra = " AND actcheck.bug_id = bugs.bug_id"; + push(@list, "(actcheck.bug_when IS NOT NULL)"); if($sql_chfrom) { $extra .= " AND actcheck.bug_when >= $sql_chfrom"; } @@ -329,8 +331,8 @@ sub init { if($sql_chvalue) { $extra .= " AND actcheck.added = $sql_chvalue"; } - push(@supptables, "INNER JOIN bugs_activity AS actcheck " . - "ON actcheck.bug_id = bugs.bug_id $extra"); + push(@supptables, "LEFT JOIN bugs_activity AS actcheck " . + "ON (" . join(" OR ", @actlist) . "$extra )"); } # Now that we're done using @list to determine if there are any |