summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-01-08 20:48:57 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-01-08 20:48:57 +0100
commit67bb62d97c91b0f98fe99059d280dd6a070dddfc (patch)
treec233293e2ed5cfc36626563f100f1df0264d76b7
parent667bd7470425d0cc4fec792a3aaa266426bdaa51 (diff)
downloadbugzilla-67bb62d97c91b0f98fe99059d280dd6a070dddfc.tar.gz
bugzilla-67bb62d97c91b0f98fe99059d280dd6a070dddfc.tar.xz
Bug 827455 - https://bugzilla.mozilla.org/page.cgi?id=release_tracking_report.html has incorrect merge dates
r=glob
-rw-r--r--extensions/BMO/lib/Reports.pm29
1 files changed, 27 insertions, 2 deletions
diff --git a/extensions/BMO/lib/Reports.pm b/extensions/BMO/lib/Reports.pm
index b660f6075..ce307d9ff 100644
--- a/extensions/BMO/lib/Reports.pm
+++ b/extensions/BMO/lib/Reports.pm
@@ -886,18 +886,43 @@ sub release_tracking_report {
my @ranges;
my $start_date = _string_to_datetime('2011-08-16');
my $end_date = $start_date->clone->add(weeks => 6)->add(days => -1);
- my $now_date = _time_to_datetime((time));
+ my $now_date = _string_to_datetime('2012-11-19');
while ($start_date <= $now_date) {
unshift @ranges, {
value => sprintf("%s-%s", $start_date->ymd(''), $end_date->ymd('')),
label => sprintf("%s and %s", $start_date->ymd('-'), $end_date->ymd('-')),
};
-
+
$start_date = $end_date->clone;;
$start_date->add(days => 1);
$end_date->add(weeks => 6);
}
+
+ # 2012-11-20 - 2013-01-06 was a 7 week release cycle instead of 6
+ $start_date = _string_to_datetime('2012-11-20');
+ $end_date = $start_date->clone->add(weeks => 7)->add(days => -1);
+ unshift @ranges, {
+ value => sprintf("%s-%s", $start_date->ymd(''), $end_date->ymd('')),
+ label => sprintf("%s and %s", $start_date->ymd('-'), $end_date->ymd('-')),
+ };
+
+ # Back on track with 6 week releases
+ $start_date = _string_to_datetime('2013-01-08');
+ $end_date = $start_date->clone->add(weeks => 6)->add(days => -1);
+ $now_date = _time_to_datetime((time));
+
+ while ($start_date <= $now_date) {
+ unshift @ranges, {
+ value => sprintf("%s-%s", $start_date->ymd(''), $end_date->ymd('')),
+ label => sprintf("%s and %s", $start_date->ymd('-'), $end_date->ymd('-')),
+ };
+
+ $start_date = $end_date->clone;;
+ $start_date->add(days => 1);
+ $end_date->add(weeks => 6);
+ }
+
push @ranges, {
value => '*',
label => 'Anytime',