Merge lp:~linaro-infrastructure/launchpad/notify-workitems-changes into lp:launchpad
Proposed by
Mattias Backman
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | no longer in the source branch. |
Merged at revision: | 14997 |
Proposed branch: | lp:~linaro-infrastructure/launchpad/notify-workitems-changes |
Merge into: | lp:launchpad |
Diff against target: |
261 lines (+146/-4) 3 files modified
lib/lp/blueprints/browser/specification.py (+19/-0) lib/lp/blueprints/mail/notifications.py (+12/-1) lib/lp/blueprints/model/tests/test_specification.py (+115/-3) |
To merge this branch: | bzr merge lp:~linaro-infrastructure/launchpad/notify-workitems-changes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+98231@code.launchpad.net |
Commit message
[r=abentley] Add email notifications for Work Item changes and fix the +workitems page.
Description of the change
This branch adds email notifications for Work Items changes on Blueprints. To get the same format users are used to from the Whiteboard we use the same mechanisms to send a diff of the workitems_text property.
I've had to add an extra transaction.
To post a comment you must log in.
Unfortunately, I don't think this actually fixes the bug. AIUI, the email notifications were not being sent because nothing emits an ObjectModifiedE vent(spec) after the spec's work items are changed (which is expected because there are no changes to the spec itself, only to things related to it) and your changes doesn't seem to cause that event to be fired either. You have the notify( ObjectModifiedE vent(.. .)) call in your tests, but in production that event is not going to be fired anywhere since the Specification object itself is not changed. My suggestion was to have updateWorkItems() fire the event, in the same way that Product. _setLicenses( ) (which is very similar to our case in that it changes objects related to the Product but not the Product itself) does.