summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-01-25 07:41:17 +0100
committerByron Jones <bjones@mozilla.com>2012-01-25 07:41:17 +0100
commitca52dda997705bc31f077a250e49d5761f381898 (patch)
treee8184686e3ff044b0a21fe06283026e6f819ef9f
parent0ea89852dd8aea5088142b2e405d544d14ec0173 (diff)
downloadbugzilla-ca52dda997705bc31f077a250e49d5761f381898.tar.gz
bugzilla-ca52dda997705bc31f077a250e49d5761f381898.tar.xz
Bug 720723: remove dupes from release-tracking-report, add calendar flags
-rw-r--r--extensions/BMO/lib/Reports.pm15
1 files changed, 14 insertions, 1 deletions
diff --git a/extensions/BMO/lib/Reports.pm b/extensions/BMO/lib/Reports.pm
index cb11de182..cae19b05d 100644
--- a/extensions/BMO/lib/Reports.pm
+++ b/extensions/BMO/lib/Reports.pm
@@ -610,6 +610,9 @@ sub release_tracking_report {
approval-comm-release
approval-comm-beta
approval-comm-aurora
+ approval-calendar-release
+ approval-calendar-beta
+ approval-calendar-aurora
);
my @flags_json;
@@ -625,10 +628,17 @@ sub release_tracking_report {
# build list of flags and their matching products
+ my @invalid_flag_names;
foreach my $flag_name (@flag_names) {
# grab all matching flag_types
my @flag_types = @{Bugzilla::FlagType::match({ name => $flag_name, is_active => 1 })};
+ # remove invalid flags
+ if (!@flag_types) {
+ push @invalid_flag_names, $flag_name;
+ next;
+ }
+
# we need a list of products, based on inclusions/exclusions
my @products;
my %flag_types;
@@ -678,6 +688,9 @@ sub release_tracking_report {
fields => [],
};
}
+ foreach my $flag_name (@invalid_flag_names) {
+ @flag_names = grep { $_ ne $flag_name } @flag_names;
+ }
@usable_products = uniq @usable_products;
# build a list of tracking flags for each product
@@ -776,7 +789,7 @@ sub release_tracking_report {
my @where;
my @params;
my $query = "
- SELECT b.bug_id
+ SELECT DISTINCT b.bug_id
FROM bugs b
INNER JOIN flags f ON f.bug_id = b.bug_id ";