Merge lp:~sinzui/launchpad/project-notify-4 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Curtis Hovey on 2012-03-24 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15007 |
| Proposed branch: | lp:~sinzui/launchpad/project-notify-4 |
| Merge into: | lp:launchpad |
| Diff against target: |
455 lines (+380/-2) 3 files modified
lib/lp/registry/interfaces/productjob.py (+55/-0) lib/lp/registry/model/productjob.py (+137/-0) lib/lp/registry/tests/test_productjob.py (+188/-2) |
| To merge this branch: | bzr merge lp:~sinzui/launchpad/project-notify-4 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | 2012-03-23 | Approve on 2012-03-23 | |
|
Review via email:
|
|||
Commit Message
Add generic ProductNotifica
Description of the Change
Launchpad bug: https:/
Pre-implementation: abentley, jcsackett
This branch adds a generic ProductNotifica
jobs that are scheduled for a product. The immediate use is for an automated
system that send out commercial subscription expiration emails at 4 weeks
and 1 week before expiration. After expiration an automated process will
update or deactivate the project and send an email.
A successful design will allow Lp support staff to create jobs during
project review such as to send an email about licensing issues, or
deactivate a problem project that also sends an email.
Subsequent branches will subclass ProductNotifica
emails to product maintainers
-------
RULES
* Create a generic notification job the sends email to product
maintainers.
QA
None as this branch only contains the classes needed by other
branches.
LINT
lib/
lib/
lib/
TEST
./bin/test -vvc -t ProductNotifica
IMPLEMENTATION
While I tried to write an actual job that did something, I discovered that
There was a lot of work needed to ensure only the correct people are
notified and provided the correct basic information. Subsequent branches
will only need to extend the run() method nd augment the message_data to
create specific notification jobs.
lib/
lib/
lib/

Hi Curtis,
This system is going to be wonderful! I wish we'd done it a long time ago.
Here are some comments on the branch, mostly hygiene.
* s/then/that in """A job then sends a notification about a product."""
* s/geBodyAndHead ers/getBodyAndH eaders
* s/messages_ data/message_ data
* s/Sent an email/Send an email
* For IProductNotific ationJobSource. create you don't document the 'subject' param.
* s/Subclasses that are updating products can want to make changes to the product before or after upcalling this classes' run() method./
Subclasses that are updating products may make changes to the product before or after calling this class' run() method./
Is that what you intended to say?
* I think assertTrue() is more readable than assertIs(True,...). Do you prefer assertIs?
* I find the test of 'commercial' in the template name to be fragile. Couldn't you make it more explicit by adding a param to the create() method?
* As usual, the tests are logical, readable, and seem to be thorough -- great!