Merge lp://staging/~bac/launchpad/bug-720147 into lp://staging/launchpad

Proposed by Brad Crittenden
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: 12967
Proposed branch: lp://staging/~bac/launchpad/bug-720147
Merge into: lp://staging/launchpad
Diff against target: 432 lines (+220/-32)
5 files modified
lib/lp/bugs/browser/bugtarget.py (+10/-10)
lib/lp/bugs/interfaces/bug.py (+5/-1)
lib/lp/bugs/model/bug.py (+14/-4)
lib/lp/bugs/scripts/tests/test_bugnotification.py (+65/-13)
lib/lp/bugs/tests/test_bug.py (+126/-4)
To merge this branch: bzr merge lp://staging/~bac/launchpad/bug-720147
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+59677@code.staging.launchpad.net

Commit message

[r=benji][bug=720147] Correctly handle filtering for bugs created without the default status.

Description of the change

= Summary =

Bugs created with a status other than NEW were sending notifications for
subscriptions with other filters.

== Proposed fix ==

The bug notification was kicked off before the status change was
effected resulting in improper notices being sent.

== Pre-implementation notes ==

This work was done by Graham and Gary. I'm merely shepherding it
through review and landing in their absence.

I did, however, clean up some lint.

== Implementation details ==

As above.

== Tests ==

bin/test -vvm lp.bugs -t test_bugnotification

== Demo and Q/A ==

Create a structural subscription with filter with NEW status. Create a
bug with initial status of TRIAGE. Ensure notification is not sent.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/bugs/browser/bugtarget.py
  lib/lp/bugs/scripts/tests/test_bugnotification.py
  lib/lp/bugs/model/bug.py
  lib/lp/bugs/tests/test_bug.py
  lib/lp/bugs/interfaces/bug.py

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

This branch looks good.

The only thought I had was that the part starting on line 13 of the diff
is a bit repetitive and I had to look very closely to see if it was
exactly the same pattern for each line or if one or more were subtly
different. However, I'm not sure my version is any better:
http://pastebin.ubuntu.com/602393/ (untested).

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.