Merge lp:~sinzui/launchpad/project-notify-5 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Curtis Hovey on 2012-04-19 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15128 |
| Proposed branch: | lp:~sinzui/launchpad/project-notify-5 |
| Merge into: | lp:launchpad |
| Diff against target: |
601 lines (+490/-1) 7 files modified
lib/lp/registry/emailtemplates/product-commercial-subscription-expiration.txt (+47/-0) lib/lp/registry/emailtemplates/product-commercial-subscription-expired-open-source.txt (+40/-0) lib/lp/registry/emailtemplates/product-commercial-subscription-expired-proprietary.txt (+41/-0) lib/lp/registry/interfaces/productjob.py (+56/-0) lib/lp/registry/model/productjob.py (+106/-1) lib/lp/registry/tests/test_productjob.py (+197/-0) lib/lp/testing/factory.py (+3/-0) |
| To merge this branch: | bzr merge lp:~sinzui/launchpad/project-notify-5 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | 2012-04-19 | Approve on 2012-04-19 | |
| Richard Harding (community) | code* | 2012-04-19 | Approve on 2012-04-19 |
|
Review via email:
|
|||
Commit Message
Send emails about commercial subscription expiration.
Description of the Change
Pre-implementation: abentley, jcsackett
Lp needs to send 30-day and 7-day commercial subscription expiration
notices, and it needs to send a message after expiration. The job that
deals with after expiration needs to deactivate the commercial features.
I hoped to also provide the mechanism to create the job's but this branch
is large and very old.
-------
RULES
* Create a job that sends an expired commercial subscription email
that also handles commercial feature deactivations:
* When the project license is proprietary, deactivate the project.
* When the project license is open source, deactivate private bugs
and branches.
* Do not make anything public...the information remains private,
but new private information cannot be made.
* Create a job that sends an commercial subscription expiration email
notice 7 days before the expiration date.
* Create a job that sends an commercial subscription expiration email
notice 30 days before the expiration date.
QA
None. My next branch will create a mechanism that created the 30, 7, and -1
day job so that we can test them. This also allows us to put the draft
emails in place while Dan provides the final draft.
LINT
lib/
lib/
lib/
lib/
lib/
lib/
lib/
TEST
./bin/test -vvc --layer=Database lp.registry.
IMPLEMENTATION
Created three email templates for the conditions we recognise. These are
drafts. I will ask Dan to revise them.
lib/
lib/
lib/
Created three kinds of emails for 30 day, 7 day, and -1 day expiration
notifications. Commercial features are deactivated by the same job that sends
the -1 day expiration. I did not want to redefine CommercialExpir
email_template_
case, but for the sake of Dan and future editors, I decided not to inject
whole paragraphs to describe what changed.
lib/
lib/
lib/
Fixed the factory which permitted me to create multiple commercial
subscriptions for a product and caused Storm to raise an exception.
lib/
| Curtis Hovey (sinzui) wrote : | # |
Yes, the if-else looks better and better for future extension. I made the change.
| j.c.sackett (jcsackett) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have nothing to add. This looks good.
review approve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iQEcBAEBAgAGBQJ
o4Vb4GfmQPzTgOe
36H8TrM2Cxb2Ieu
Pe28LG1yTncS+
9HmoTrVBAMZmh9g
LAsd1oNOhVjloGr
=H2+i
-----END PGP SIGNATURE-----

Looks ok to me. My only nitpick is that I'd usually suggest using if else vs just if return, return. However I don't find anything noting it in the style guide.