summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/lib
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-07-17 09:53:59 +0200
committerByron Jones <bjones@mozilla.com>2012-07-17 09:53:59 +0200
commit93ae141ca9e906cf65e1b77dabaea6a8db21c6f7 (patch)
treee70669983e7a3afb3d6098bcd782c9f4f709306b /extensions/BMO/lib
parent4608e86fd168d956cf1a3ce28843344327fbb166 (diff)
downloadbugzilla-93ae141ca9e906cf65e1b77dabaea6a8db21c6f7.tar.gz
bugzilla-93ae141ca9e906cf65e1b77dabaea6a8db21c6f7.tar.xz
sync some missing changes from bmo/4.0
Diffstat (limited to 'extensions/BMO/lib')
-rw-r--r--extensions/BMO/lib/Reports.pm27
1 files changed, 24 insertions, 3 deletions
diff --git a/extensions/BMO/lib/Reports.pm b/extensions/BMO/lib/Reports.pm
index a06d796b5..9e07c40e7 100644
--- a/extensions/BMO/lib/Reports.pm
+++ b/extensions/BMO/lib/Reports.pm
@@ -201,6 +201,13 @@ sub user_activity_report {
my $list = $dbh->selectall_arrayref($query, undef, @params);
+ if ($input->{debug}) {
+ while (my $param = shift @params) {
+ $query =~ s/\?/$dbh->quote($param)/e;
+ }
+ $vars->{debug_sql} = $query;
+ }
+
my @operations;
my $operation = {};
my $changes = [];
@@ -245,7 +252,11 @@ sub user_activity_report {
if ($order eq 'bug_when') {
$is_new_changeset =
$operation->{'who'} &&
- ($who ne $operation->{'who'} || $when ne $operation->{'when'});
+ (
+ $who ne $operation->{'who'}
+ || $when ne $operation->{'when'}
+ || $bugid != $operation->{'bug'}
+ );
} else {
$is_new_changeset =
$operation->{'bug'} &&
@@ -895,7 +906,7 @@ sub release_tracking_report {
# run report
#
- if ($input->{q}) {
+ if ($input->{q} && !$input->{edit}) {
my $q = _parse_query($input->{q});
my @where;
@@ -921,7 +932,7 @@ sub release_tracking_report {
push @params, $q->{end_date} . ' 00:00:00';
push @where, "(a.added LIKE ?)";
- push @params, '%' . $q->{flag_name} . '?%';
+ push @params, '%' . $q->{flag_name} . $q->{flag_status} . '%';
}
push @where, "(f.type_id IN (SELECT id FROM flagtypes WHERE name = ?))";
@@ -950,6 +961,16 @@ sub release_tracking_report {
$query .= join("\nAND ", @where);
+ if ($input->{debug}) {
+ print "Content-Type: text/plain\n\n";
+ $query =~ s/\?/\000/g;
+ foreach my $param (@params) {
+ $query =~ s/\000/$param/;
+ }
+ print "$query\n";
+ exit;
+ }
+
my $bugs = $dbh->selectcol_arrayref($query, undef, @params);
push @$bugs, 0 unless @$bugs;