Merge lp:~stevenk/launchpad/destroy-cause-unknownrecipienterror into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Steve Kowalik | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 15989 | ||||
Proposed branch: | lp:~stevenk/launchpad/destroy-cause-unknownrecipienterror | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
331 lines (+65/-67) 2 files modified
lib/lp/bugs/browser/tests/test_bugtask.py (+57/-67) lib/lp/bugs/subscribers/bug.py (+8/-0) |
||||
To merge this branch: | bzr merge lp:~stevenk/launchpad/destroy-cause-unknownrecipienterror | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Booth (community) | Approve | ||
Review via email: mp+125397@code.launchpad.net |
Commit message
Ignore new subscribers that are not in the recipient list when filtering for the assignee in the depths of the bug zope subscribers.
Description of the change
When changing assignee, we want to filter it out of the "normal" notification mail that other subscribers recieve. To this end in the zope subscriber function receives a list of subscribers that will be notified by set difference using the two objects on the event. We then trawl through this list looking for the assignee so we can remove them.
So, this is fine. In the case that we only change the assignee, *or* all new subscribers are in the recipients list we build. Where this house of cards completely falls down is if we have a structural subscriber on a milestone with LIFECYCLE set. (LIFECYCLE subscribers only get notified on a new bug or a bug being closed.) When the assignee is changed and the milestone is set in *one action* using BugTask:
Yay for layering violations. I've worked around this by checking if the person is in the recipients list first, and added a verbose comment to that effect.
I have also gone through test_bugtask.py and removed a bunch of excess whitespace to cause this branch to be a net LoC loss. Also, correct a thinko that I noticed.