Merge lp:~abentley/lp-release-manager-tools/exclude-exact-finish into lp:~sinzui/lp-release-manager-tools/trunk

Proposed by Aaron Bentley
Status: Needs review
Proposed branch: lp:~abentley/lp-release-manager-tools/exclude-exact-finish
Merge into: lp:~sinzui/lp-release-manager-tools/trunk
Diff against target: 19 lines (+2/-2)
1 file modified
lp_release_tools/report_bugs.py (+2/-2)
To merge this branch: bzr merge lp:~abentley/lp-release-manager-tools/exclude-exact-finish
Reviewer Review Type Date Requested Status
Curtis Hovey code Approve
Review via email: mp+223763@code.launchpad.net

Commit message

Ignore bugs created or closed at the cycle's finish.

Description of the change

Bug events (being open or closed) should not be part of two cycles. The current collation includes the start and finish of the cycle. The finish of one cycle is the start of the following cycle (if there is one). So an event that happens at the finish of a cycle will usually be part of that cycle and the following cycle.

To fix this, we must exclude either the start or the finish of the cycle. To me, it is intuitive that the start of the cycle should be included, therefore we should exclude the end of the cycle. This branch does that.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

\o/ I have been meaning to do this.

review: Approve (code)

Unmerged revisions

31. By Aaron Bentley

Exclude dates at the 'finish' value.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lp_release_tools/report_bugs.py'
2--- lp_release_tools/report_bugs.py 2014-06-17 18:21:12 +0000
3+++ lp_release_tools/report_bugs.py 2014-06-19 14:47:10 +0000
4@@ -168,7 +168,7 @@
5 for cycle in cycles:
6 if bug.date_closed and bug.date_closed < cycle.start:
7 break
8- if bug.date_created > cycle.finish:
9+ if bug.date_created >= cycle.finish:
10 continue
11 if not bug.date_closed or not bug.date_closed < cycle.finish:
12 cycle.total.append(bug)
13@@ -181,7 +181,7 @@
14 cycle.closed.append(bug)
15 if (bug.date_created <= cycle.start
16 and (not bug.date_closed
17- or bug.date_closed > cycle.finish)):
18+ or bug.date_closed >= cycle.finish)):
19 cycle.held.append(bug)
20
21

Subscribers

People subscribed via source and target branches

to all changes: