From ca52dda997705bc31f077a250e49d5761f381898 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 25 Jan 2012 14:41:17 +0800 Subject: Bug 720723: remove dupes from release-tracking-report, add calendar flags --- extensions/BMO/lib/Reports.pm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'extensions/BMO/lib/Reports.pm') 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 "; -- cgit v1.2.3-24-g4f1b