Merge lp:~wgrant/launchpad/team-verbose-bugnotifications-bug-253788 into lp:launchpad/db-devel
- team-verbose-bugnotifications-bug-253788
- Merge into db-devel
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~wgrant/launchpad/team-verbose-bugnotifications-bug-253788 |
Merge into: | lp:launchpad/db-devel |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~wgrant/launchpad/team-verbose-bugnotifications-bug-253788 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+9190@code.launchpad.net |
Commit message
Description of the change
William Grant (wgrant) wrote : | # |
Graham Binns (gmb) wrote : | # |
Hi William,
Thanks for submitting this branch. I think you're the first community
contributer to Launchpad - which I honestly kinda expected anyway.
This is a really good branch. As we discussed on IRC, you're going to
drop the sampledata changes and rewrite the tests to use the factory.
I'm going to mark the branch needs-fixing for the sake of taking a look
at the new tests.
The code is fine. There are a couple of stylistic changes I want you to
make but nothing major. This is a really nice patch for an annoying
problem (which, incidentally, I've just noticed is starting to crop up
on the launchpad-dev list too, so this might be worth cherrypicking;
we'll see what Kiko says).
review needs-fixing
> === modified file 'database/
We've agreed on IRC that we can drop this change for using the object
factory and all that new hotness.
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -1272,8 +1272,21 @@
> >>> bug_15.
> <...>
>
> -If we then add a comment to the bug, ddaa will receieve a notification
> -containing that comment.
> +Notifications sent through a team membership respect the member's
> +verbose_
> +through his membership in landscape-
> +he wants verbose notifications.
> +
> + >>> salgado = getUtility(
> + >>> salgado.
> + True
> +
> + >>> ls = getUtility(
> + >>> ls.verbose_
> + False
> +
> +If we then add a comment to the bug, ddaa and salgado will receieve
> +notifications containing that comment.
>
> >>> comment = getUtility(
> ... 'subject', 'a really simple comment.', sample_person,
> @@ -1286,10 +1299,11 @@
> 1
>
> If we pass this notifcation to get_email_
> -ddaa will receieve a notification which contains the bug description and
> -its status in all of its targets. All other subscribers will receive
> -standard notifications that don't include the bug description. To help
> -with demonstrating this, we'll define a helper function.
> +ddaa and salgado will receieve a notification which contains the bug
> +description and its status in all of its targets. All other subscribers
> +will receive standard notifications that don't include the bug
> +description. To help with demonstrating this, we'll define a helper
> +function.
>
> >>> def collate_
> ... messages_
> @@ -1350,6 +1364,31 @@
> <BLANKLINE>
> -------
>
> +And salgado does too:
> +
> + >>> print_notification(
> + ... collated_
> + To: <email address hidden>
> + From: Sample Person <email address hidden>
> + Subject: [Bug 1...
William Grant (wgrant) wrote : | # |
Thanks Graham, I believe I've fixed all those issues.
=== modified file 'database/
--- database/
+++ database/
@@ -4687,7 +4687,7 @@
[snip reversion of change]
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -1247,9 +1247,40 @@
cases where the user doesn't save bug notifications, which can make
subsequent notifications seem somewhat obscure.
+To demonstrate verbose notifications, we'll create a bug, and subscribe
+some very picky users to it. Verbose Person wants verbose emails, while
+Concise Person does not. We'll also create a team with a member that
+wants verbose notifications.
+
+ >>> switch_
+ >>> bug = factory.
+ ... title='Foo is broken', description='desc')
+
+ >>> vperson = factory.
+ ... <email address hidden>')
+ >>> vperson.
+ >>> bug.subscribe(
+ <BugSubscriptio
+
+ >>> cperson = factory.
+ ... <email address hidden>')
+ >>> cperson.
+ >>> bug.subscribe(
+ <BugSubscriptio
+
+ >>> team = factory.
+ >>> team.verbose_
+ >>> tperson = factory.
+ ... <email address hidden>')
+ >>> tperson.
+ >>> team.addMember(
+ >>> bug.subscribe(team, tperson)
+ <BugSubscriptio
+
We'll expire all existing notifications since we're not interested in
them:
+ >>> switch_
>>> notifications = getUtility(
... IBugNotificatio
>>> len(notifications)
@@ -1261,37 +1292,13 @@
... syncUpdate(
-To demonstrate verbose notifications, we'll subscribe David Allouche,
-who receives verbose bug notifications, to bug 15.
-
- >>> bug_15 = getUtility(
- >>> ddaa = getUtility(
- >>> ddaa.verbose_
- True
-
- >>> bug_15.
- <...>
-
-Notifications sent through a team membership respect the member's
-verbose_
-through his membership in landscape-
-he wants verbose notifications.
-
- >>> salgado = getUtility(
- >>> salgado.
- True
-
- >>> ls = getUtility(
- >>> ls.verbose_
- False
-
-If we then add a comment to the bug, ddaa and salgado will receieve
+If we then add a ...
Graham Binns (gmb) wrote : | # |
Hi William,
The changes look good. You've agreed to add a test for the case where
Person.
Team.verbose_
There are a couple of stylistic changes I'd like you to make, otherwise
this is ready to go once that test has been added.
On Thu, Jul 23, 2009 at 03:00:39PM -0000, William Grant wrote:
> Thanks Graham, I believe I've fixed all those issues.
>
> === modified file 'database/
> --- database/
> +++ database/
> @@ -4687,7 +4687,7 @@
> [snip reversion of change]
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -1247,9 +1247,40 @@
> cases where the user doesn't save bug notifications, which can make
> subsequent notifications seem somewhat obscure.
>
> +To demonstrate verbose notifications, we'll create a bug, and subscribe
> +some very picky users to it. Verbose Person wants verbose emails, while
> +Concise Person does not. We'll also create a team with a member that
> +wants verbose notifications.
> +
> + >>> switch_
> + >>> bug = factory.
> + ... title='Foo is broken', description='desc')
We prefer to do wrapping of method calls thus:
>>> bug = factory.makeBug(
... product=
... description='desc')
See http://
you've done it is okay, but we've pretty much standardised on the
style above, so we should stick with that (in fact I don't know why the
other version is in the style guide any more; this one is the one that
gets used).
> +
> + >>> vperson = factory.
> + ... <email address hidden>')
> + >>> vperson.
> + >>> bug.subscribe(
> + <BugSubscriptio
> +
We should be verbose in tests where possible. So,
s/vperson/
> + >>> cperson = factory.
> + ... <email address hidden>')
> + >>> cperson.
> + >>> bug.subscribe(
> + <BugSubscriptio
> +
And s/cperson/
> + >>> team = factory.
> + >>> team.verbose_
> + >>> tperson = factory.
> + ... <email address hidden>')
And s/tperson/
> + >>> tperson.
> + >>> team.addMember(
> + >>> bug.subscribe(team, tperson)
> + <BugSubscriptio
> +
> We'll expire all existing notifications since we're not interested in
> them:
>
> + >>> switch_
> >>> notifications = getUti...
William Grant (wgrant) wrote : | # |
I've added the other case and renamed the variables.
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -1249,32 +1249,53 @@
To demonstrate verbose notifications, we'll create a bug, and subscribe
some very picky users to it. Verbose Person wants verbose emails, while
-Concise Person does not. We'll also create a team with a member that
-wants verbose notifications.
+Concise Person does not. We'll also create teams and give them members
+with different verbose_
>>> switch_
- >>> bug = factory.
- ... title='Foo is broken', description='desc')
-
- >>> vperson = factory.
- ... <email address hidden>')
- >>> vperson.
- >>> bug.subscribe(
- <BugSubscriptio
-
- >>> cperson = factory.
- ... <email address hidden>')
- >>> cperson.
- >>> bug.subscribe(
- <BugSubscriptio
-
- >>> team = factory.
- >>> team.verbose_
- >>> tperson = factory.
- ... <email address hidden>')
- >>> tperson.
- >>> team.addMember(
- >>> bug.subscribe(team, tperson)
+ >>> bug = factory.makeBug(
+ ... product=
+ ... description='desc')
+
+ >>> verbose_person = factory.makePerson(
+ ... displayname=
+ >>> verbose_
+ >>> bug.subscribe(
+ <BugSubscriptio
+
+ >>> concise_person = factory.makePerson(
+ ... displayname=
+ >>> concise_
+ >>> bug.subscribe(
+ <BugSubscriptio
+
+
+Concise Team doesn't want verbose notifications, while Concise Team
+Person, a member, does.
+
+ >>> concise_team = factory.makeTeam(
+ ... name='conciseteam', displayname=
+ >>> concise_
+ >>> concise_team_person = factory.makePerson(
+ ... displayname=
+ ... <email address hidden>')
+ >>> concise_
+ >>> concise_
+ >>> bug.subscribe(
+ <BugSubscriptio
+
+Verbose Team wants verbose notifications, while Verbose Team Person, a
+member, does not.
+
+ >>> verbose_team = factory.makeTeam(
+ ... name='verboseteam', displayname=
Graham Binns (gmb) wrote : | # |
Hi William,
This looks awesome. Merge approved!
review approve code
status approved
Barry Warsaw (barry) wrote : | # |
On Jul 23, 2009, at 11:18 AM, Graham Binns wrote:
>>
>> + >>> switch_
>> + >>> bug =
>> factory.
>> + ... title='Foo is broken',
>> description='desc')
>
> We prefer to do wrapping of method calls thus:
>
>>>> bug = factory.makeBug(
> ... product=
> broken',
> ... description='desc')
>
> See http://
> you've done it is okay, but we've pretty much standardised on the
> style above, so we should stick with that (in fact I don't know why
> the
> other version is in the style guide any more; this one is the one that
> gets used).
TOOWTDI. I've updated the style guide.
-Barry
Preview Diff
1 | === modified file 'database/sampledata/current.sql' | |||
2 | --- database/sampledata/current.sql 2009-07-17 00:26:05 +0000 | |||
3 | +++ database/sampledata/current.sql 2009-07-23 04:49:04 +0000 | |||
4 | @@ -4687,7 +4687,7 @@ | |||
5 | 4687 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (26, 'Daniel Silverstone', NULL, NULL, 'kinnison', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.618722', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 2, 'when importing bugs from http://bugzilla.ubuntu.com/', NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 261); | 4687 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (26, 'Daniel Silverstone', NULL, NULL, 'kinnison', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.618722', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 2, 'when importing bugs from http://bugzilla.ubuntu.com/', NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 261); |
6 | 4688 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (27, 'Daniel Henrique Debonzi', NULL, NULL, 'debonzi', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.557224', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 271); | 4688 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (27, 'Daniel Henrique Debonzi', NULL, NULL, 'debonzi', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.557224', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 271); |
7 | 4689 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (28, 'Celso Providelo', NULL, NULL, 'cprov', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.59705', 'Somewhere', 'in this world', 'Something', 'whatever', 'not mandatory', 75, '999432423', '+55 16 3374-2027', NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 281); | 4689 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (28, 'Celso Providelo', NULL, NULL, 'cprov', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.59705', 'Somewhere', 'in this world', 'Something', 'whatever', 'not mandatory', 75, '999432423', '+55 16 3374-2027', NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 281); |
9 | 4690 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (29, 'Guilherme Salgado', NULL, NULL, 'salgado', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.596025', 'Somewhere', 'in this world', 'Something', 'whatever', 'not mandatory', 75, '999432423', '+55 16 3374-2027', NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, 291); | 4690 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (29, 'Guilherme Salgado', NULL, NULL, 'salgado', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.596025', 'Somewhere', 'in this world', 'Something', 'whatever', 'not mandatory', 75, '999432423', '+55 16 3374-2027', NULL, NULL, NULL, false, 8, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, true, 291); |
10 | 4691 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (30, 'Rosetta Administrators', 25, 'Rosetta Administrators', 'rosetta-admins', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.613368', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL); | 4691 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (30, 'Rosetta Administrators', 25, 'Rosetta Administrators', 'rosetta-admins', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.613368', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL); |
11 | 4692 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (31, 'Ubuntu Translators', 30, 'Ubuntu Translators', 'ubuntu-translators', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.617651', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL); | 4692 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (31, 'Ubuntu Translators', 30, 'Ubuntu Translators', 'ubuntu-translators', NULL, NULL, NULL, NULL, 1, NULL, '2005-06-06 08:59:51.617651', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL); |
12 | 4693 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (32, 'GuadaMen', 16, 'The guadalinex maintainers team', 'guadamen', NULL, NULL, 700, 300, 1, NULL, '2005-06-06 08:59:51.606755', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL); | 4693 | INSERT INTO person (id, displayname, teamowner, teamdescription, name, language, fti, defaultmembershipperiod, defaultrenewalperiod, subscriptionpolicy, merged, datecreated, addressline1, addressline2, organization, city, province, country, postcode, phone, homepage_content, icon, mugshot, hide_email_addresses, creation_rationale, creation_comment, registrant, logo, renewal_policy, personal_standing, personal_standing_reason, mail_resumption_date, mailing_list_auto_subscribe_policy, mailing_list_receive_duplicates, visibility, verbose_bugnotifications, account) VALUES (32, 'GuadaMen', 16, 'The guadalinex maintainers team', 'guadamen', NULL, NULL, 700, 300, 1, NULL, '2005-06-06 08:59:51.606755', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, 10, 0, NULL, NULL, 1, true, 1, false, NULL); |
13 | 4694 | 4694 | ||
14 | === modified file 'lib/lp/bugs/doc/bugnotification-sending.txt' | |||
15 | --- lib/lp/bugs/doc/bugnotification-sending.txt 2009-06-12 16:36:02 +0000 | |||
16 | +++ lib/lp/bugs/doc/bugnotification-sending.txt 2009-07-23 04:51:44 +0000 | |||
17 | @@ -59,6 +59,33 @@ | |||
18 | 59 | >>> for bug_notifications, messages in email_notifications: | 59 | >>> for bug_notifications, messages in email_notifications: |
19 | 60 | ... for message in messages: | 60 | ... for message in messages: |
20 | 61 | ... print_notification(message) | 61 | ... print_notification(message) |
21 | 62 | To: foo.bar@canonical.com | ||
22 | 63 | From: Sample Person <test@canonical.com> | ||
23 | 64 | Subject: [Bug 1] subject | ||
24 | 65 | X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu) | ||
25 | 66 | <BLANKLINE> | ||
26 | 67 | a comment. | ||
27 | 68 | <BLANKLINE> | ||
28 | 69 | ... | ||
29 | 70 | Firefox does not support SVG | ||
30 | 71 | http://bugs.launchpad.dev/bugs/1 | ||
31 | 72 | You received this bug notification because you are subscribed to | ||
32 | 73 | mozilla-firefox in ubuntu. | ||
33 | 74 | <BLANKLINE> | ||
34 | 75 | ---------------------------------------------------------------------- | ||
35 | 76 | To: mark@hbd.com | ||
36 | 77 | From: Sample Person <test@canonical.com> | ||
37 | 78 | Subject: [Bug 1] subject | ||
38 | 79 | X-Launchpad-Message-Rationale: Assignee | ||
39 | 80 | <BLANKLINE> | ||
40 | 81 | a comment. | ||
41 | 82 | <BLANKLINE> | ||
42 | 83 | ... | ||
43 | 84 | Firefox does not support SVG | ||
44 | 85 | http://bugs.launchpad.dev/bugs/1 | ||
45 | 86 | You received this bug notification because you are a bug assignee. | ||
46 | 87 | <BLANKLINE> | ||
47 | 88 | ---------------------------------------------------------------------- | ||
48 | 62 | To: support@ubuntu.com | 89 | To: support@ubuntu.com |
49 | 63 | From: Sample Person <test@canonical.com> | 90 | From: Sample Person <test@canonical.com> |
50 | 64 | Subject: [Bug 1] subject | 91 | Subject: [Bug 1] subject |
51 | @@ -73,19 +100,6 @@ | |||
52 | 73 | Team, which is the registrant for Ubuntu. | 100 | Team, which is the registrant for Ubuntu. |
53 | 74 | <BLANKLINE> | 101 | <BLANKLINE> |
54 | 75 | ---------------------------------------------------------------------- | 102 | ---------------------------------------------------------------------- |
55 | 76 | To: mark@hbd.com | ||
56 | 77 | From: Sample Person <test@canonical.com> | ||
57 | 78 | Subject: [Bug 1] subject | ||
58 | 79 | X-Launchpad-Message-Rationale: Assignee | ||
59 | 80 | <BLANKLINE> | ||
60 | 81 | a comment. | ||
61 | 82 | <BLANKLINE> | ||
62 | 83 | ... | ||
63 | 84 | Firefox does not support SVG | ||
64 | 85 | http://bugs.launchpad.dev/bugs/1 | ||
65 | 86 | You received this bug notification because you are a bug assignee. | ||
66 | 87 | <BLANKLINE> | ||
67 | 88 | ---------------------------------------------------------------------- | ||
68 | 89 | To: test@canonical.com | 103 | To: test@canonical.com |
69 | 90 | From: Sample Person <test@canonical.com> | 104 | From: Sample Person <test@canonical.com> |
70 | 91 | Subject: [Bug 1] subject | 105 | Subject: [Bug 1] subject |
71 | @@ -100,20 +114,6 @@ | |||
72 | 100 | of the bug. | 114 | of the bug. |
73 | 101 | <BLANKLINE> | 115 | <BLANKLINE> |
74 | 102 | ---------------------------------------------------------------------- | 116 | ---------------------------------------------------------------------- |
75 | 103 | To: foo.bar@canonical.com | ||
76 | 104 | From: Sample Person <test@canonical.com> | ||
77 | 105 | Subject: [Bug 1] subject | ||
78 | 106 | X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu) | ||
79 | 107 | <BLANKLINE> | ||
80 | 108 | a comment. | ||
81 | 109 | <BLANKLINE> | ||
82 | 110 | ... | ||
83 | 111 | Firefox does not support SVG | ||
84 | 112 | http://bugs.launchpad.dev/bugs/1 | ||
85 | 113 | You received this bug notification because you are subscribed to | ||
86 | 114 | mozilla-firefox in ubuntu. | ||
87 | 115 | <BLANKLINE> | ||
88 | 116 | ---------------------------------------------------------------------- | ||
89 | 117 | 117 | ||
90 | 118 | You can see that the message above contains the bug's initial comment's | 118 | You can see that the message above contains the bug's initial comment's |
91 | 119 | message id as its reference, in order to make it thread properly in the | 119 | message id as its reference, in order to make it thread properly in the |
92 | @@ -167,6 +167,10 @@ | |||
93 | 167 | >>> for bug_notifications, messages in email_notifications: | 167 | >>> for bug_notifications, messages in email_notifications: |
94 | 168 | ... for message in messages: | 168 | ... for message in messages: |
95 | 169 | ... print_notification(message) | 169 | ... print_notification(message) |
96 | 170 | To: foo.bar@canonical.com | ||
97 | 171 | ... | ||
98 | 172 | To: mark@hbd.com | ||
99 | 173 | ... | ||
100 | 170 | To: support@ubuntu.com | 174 | To: support@ubuntu.com |
101 | 171 | From: Sample Person <test@canonical.com> | 175 | From: Sample Person <test@canonical.com> |
102 | 172 | Subject: Re: [Bug 1] subject | 176 | Subject: Re: [Bug 1] subject |
103 | @@ -181,12 +185,8 @@ | |||
104 | 181 | Team, which is the registrant for Ubuntu. | 185 | Team, which is the registrant for Ubuntu. |
105 | 182 | <BLANKLINE> | 186 | <BLANKLINE> |
106 | 183 | ---------------------------------------------------------------------- | 187 | ---------------------------------------------------------------------- |
107 | 184 | To: mark@hbd.com | ||
108 | 185 | ... | ||
109 | 186 | To: test@canonical.com | 188 | To: test@canonical.com |
110 | 187 | ... | 189 | ... |
111 | 188 | To: foo.bar@canonical.com | ||
112 | 189 | ... | ||
113 | 190 | 190 | ||
114 | 191 | >>> flush_notifications() | 191 | >>> flush_notifications() |
115 | 192 | 192 | ||
116 | @@ -207,6 +207,10 @@ | |||
117 | 207 | >>> for bug_notifications, messages in email_notifications: | 207 | >>> for bug_notifications, messages in email_notifications: |
118 | 208 | ... for message in messages: | 208 | ... for message in messages: |
119 | 209 | ... print_notification(message) | 209 | ... print_notification(message) |
120 | 210 | To: foo.bar@canonical.com | ||
121 | 211 | ... | ||
122 | 212 | To: mark@hbd.com | ||
123 | 213 | ... | ||
124 | 210 | To: support@ubuntu.com | 214 | To: support@ubuntu.com |
125 | 211 | From: Sample Person <test@canonical.com> | 215 | From: Sample Person <test@canonical.com> |
126 | 212 | Subject: [Bug 1] Re: Firefox does not support SVG | 216 | Subject: [Bug 1] Re: Firefox does not support SVG |
127 | @@ -223,12 +227,8 @@ | |||
128 | 223 | Team, which is the registrant for Ubuntu. | 227 | Team, which is the registrant for Ubuntu. |
129 | 224 | <BLANKLINE> | 228 | <BLANKLINE> |
130 | 225 | ---------------------------------------------------------------------- | 229 | ---------------------------------------------------------------------- |
131 | 226 | To: mark@hbd.com | ||
132 | 227 | ... | ||
133 | 228 | To: test@canonical.com | 230 | To: test@canonical.com |
134 | 229 | ... | 231 | ... |
135 | 230 | To: foo.bar@canonical.com | ||
136 | 231 | ... | ||
137 | 232 | 232 | ||
138 | 233 | If we insert a comment and some more changes, they will be included in | 233 | If we insert a comment and some more changes, they will be included in |
139 | 234 | the constructed email: | 234 | the constructed email: |
140 | @@ -255,6 +255,10 @@ | |||
141 | 255 | >>> for bug_notifications, messages in email_notifications: | 255 | >>> for bug_notifications, messages in email_notifications: |
142 | 256 | ... for message in messages: | 256 | ... for message in messages: |
143 | 257 | ... print_notification(message) | 257 | ... print_notification(message) |
144 | 258 | To: foo.bar@canonical.com | ||
145 | 259 | ... | ||
146 | 260 | To: mark@hbd.com | ||
147 | 261 | ... | ||
148 | 258 | To: support@ubuntu.com | 262 | To: support@ubuntu.com |
149 | 259 | From: Sample Person <test@canonical.com> | 263 | From: Sample Person <test@canonical.com> |
150 | 260 | Subject: [Bug 1] Re: Firefox does not support SVG | 264 | Subject: [Bug 1] Re: Firefox does not support SVG |
151 | @@ -276,12 +280,8 @@ | |||
152 | 276 | You received this bug notification because you are a member of Ubuntu | 280 | You received this bug notification because you are a member of Ubuntu |
153 | 277 | Team, which is the registrant for Ubuntu. | 281 | Team, which is the registrant for Ubuntu. |
154 | 278 | ---------------------------------------------------------------------- | 282 | ---------------------------------------------------------------------- |
155 | 279 | To: mark@hbd.com | ||
156 | 280 | ... | ||
157 | 281 | To: test@canonical.com | 283 | To: test@canonical.com |
158 | 282 | ... | 284 | ... |
159 | 283 | To: foo.bar@canonical.com | ||
160 | 284 | ... | ||
161 | 285 | 285 | ||
162 | 286 | If we insert yet another comment, it will be sent as a separate email. | 286 | If we insert yet another comment, it will be sent as a separate email. |
163 | 287 | 287 | ||
164 | @@ -298,6 +298,10 @@ | |||
165 | 298 | >>> for bug_notifications, messages in email_notifications: | 298 | >>> for bug_notifications, messages in email_notifications: |
166 | 299 | ... for message in messages: | 299 | ... for message in messages: |
167 | 300 | ... print_notification(message) | 300 | ... print_notification(message) |
168 | 301 | To: foo.bar@canonical.com | ||
169 | 302 | ... | ||
170 | 303 | To: mark@hbd.com | ||
171 | 304 | ... | ||
172 | 301 | To: support@ubuntu.com | 305 | To: support@ubuntu.com |
173 | 302 | From: Sample Person <test@canonical.com> | 306 | From: Sample Person <test@canonical.com> |
174 | 303 | Subject: [Bug 1] Re: Firefox does not support SVG | 307 | Subject: [Bug 1] Re: Firefox does not support SVG |
175 | @@ -320,12 +324,12 @@ | |||
176 | 320 | Team, which is the registrant for Ubuntu. | 324 | Team, which is the registrant for Ubuntu. |
177 | 321 | <BLANKLINE> | 325 | <BLANKLINE> |
178 | 322 | ---------------------------------------------------------------------- | 326 | ---------------------------------------------------------------------- |
179 | 323 | To: mark@hbd.com | ||
180 | 324 | ... | ||
181 | 325 | To: test@canonical.com | 327 | To: test@canonical.com |
182 | 326 | ... | 328 | ... |
183 | 327 | To: foo.bar@canonical.com | 329 | To: foo.bar@canonical.com |
184 | 328 | ... | 330 | ... |
185 | 331 | To: mark@hbd.com | ||
186 | 332 | ... | ||
187 | 329 | To: support@ubuntu.com | 333 | To: support@ubuntu.com |
188 | 330 | From: Sample Person <test@canonical.com> | 334 | From: Sample Person <test@canonical.com> |
189 | 331 | Subject: [Bug 1] subject | 335 | Subject: [Bug 1] subject |
190 | @@ -340,12 +344,8 @@ | |||
191 | 340 | Team, which is the registrant for Ubuntu. | 344 | Team, which is the registrant for Ubuntu. |
192 | 341 | <BLANKLINE> | 345 | <BLANKLINE> |
193 | 342 | ---------------------------------------------------------------------- | 346 | ---------------------------------------------------------------------- |
194 | 343 | To: mark@hbd.com | ||
195 | 344 | ... | ||
196 | 345 | To: test@canonical.com | 347 | To: test@canonical.com |
197 | 346 | ... | 348 | ... |
198 | 347 | To: foo.bar@canonical.com | ||
199 | 348 | ... | ||
200 | 349 | 349 | ||
201 | 350 | >>> flush_notifications() | 350 | >>> flush_notifications() |
202 | 351 | 351 | ||
203 | @@ -372,6 +372,10 @@ | |||
204 | 372 | >>> for bug_notifications, messages in email_notifications: | 372 | >>> for bug_notifications, messages in email_notifications: |
205 | 373 | ... for message in messages: | 373 | ... for message in messages: |
206 | 374 | ... print_notification(message) | 374 | ... print_notification(message) |
207 | 375 | To: foo.bar@canonical.com | ||
208 | 376 | ... | ||
209 | 377 | To: mark@hbd.com | ||
210 | 378 | ... | ||
211 | 375 | To: support@ubuntu.com | 379 | To: support@ubuntu.com |
212 | 376 | From: Sample Person <test@canonical.com> | 380 | From: Sample Person <test@canonical.com> |
213 | 377 | Subject: [Bug 1] subject | 381 | Subject: [Bug 1] subject |
214 | @@ -386,12 +390,12 @@ | |||
215 | 386 | Team, which is the registrant for Ubuntu. | 390 | Team, which is the registrant for Ubuntu. |
216 | 387 | <BLANKLINE> | 391 | <BLANKLINE> |
217 | 388 | ---------------------------------------------------------------------- | 392 | ---------------------------------------------------------------------- |
218 | 389 | To: mark@hbd.com | ||
219 | 390 | ... | ||
220 | 391 | To: test@canonical.com | 393 | To: test@canonical.com |
221 | 392 | ... | 394 | ... |
222 | 393 | To: foo.bar@canonical.com | 395 | To: foo.bar@canonical.com |
223 | 394 | ... | 396 | ... |
224 | 397 | To: mark@hbd.com | ||
225 | 398 | ... | ||
226 | 395 | To: support@ubuntu.com | 399 | To: support@ubuntu.com |
227 | 396 | From: Sample Person <test@canonical.com> | 400 | From: Sample Person <test@canonical.com> |
228 | 397 | Subject: [Bug 1] subject | 401 | Subject: [Bug 1] subject |
229 | @@ -406,12 +410,12 @@ | |||
230 | 406 | Team, which is the registrant for Ubuntu. | 410 | Team, which is the registrant for Ubuntu. |
231 | 407 | <BLANKLINE> | 411 | <BLANKLINE> |
232 | 408 | ---------------------------------------------------------------------- | 412 | ---------------------------------------------------------------------- |
233 | 409 | To: mark@hbd.com | ||
234 | 410 | ... | ||
235 | 411 | To: test@canonical.com | 413 | To: test@canonical.com |
236 | 412 | ... | 414 | ... |
237 | 413 | To: foo.bar@canonical.com | 415 | To: foo.bar@canonical.com |
238 | 414 | ... | 416 | ... |
239 | 417 | To: mark@hbd.com | ||
240 | 418 | ... | ||
241 | 415 | To: support@ubuntu.com | 419 | To: support@ubuntu.com |
242 | 416 | From: Sample Person <test@canonical.com> | 420 | From: Sample Person <test@canonical.com> |
243 | 417 | Subject: [Bug 1] subject | 421 | Subject: [Bug 1] subject |
244 | @@ -426,12 +430,8 @@ | |||
245 | 426 | Team, which is the registrant for Ubuntu. | 430 | Team, which is the registrant for Ubuntu. |
246 | 427 | <BLANKLINE> | 431 | <BLANKLINE> |
247 | 428 | ---------------------------------------------------------------------- | 432 | ---------------------------------------------------------------------- |
248 | 429 | To: mark@hbd.com | ||
249 | 430 | ... | ||
250 | 431 | To: test@canonical.com | 433 | To: test@canonical.com |
251 | 432 | ... | 434 | ... |
252 | 433 | To: foo.bar@canonical.com | ||
253 | 434 | ... | ||
254 | 435 | 435 | ||
255 | 436 | >>> flush_notifications() | 436 | >>> flush_notifications() |
256 | 437 | 437 | ||
257 | @@ -460,6 +460,10 @@ | |||
258 | 460 | >>> for bug_notifications, messages in email_notifications: | 460 | >>> for bug_notifications, messages in email_notifications: |
259 | 461 | ... for message in messages: | 461 | ... for message in messages: |
260 | 462 | ... print_notification(message) | 462 | ... print_notification(message) |
261 | 463 | To: foo.bar@canonical.com | ||
262 | 464 | ... | ||
263 | 465 | To: mark@hbd.com | ||
264 | 466 | ... | ||
265 | 463 | To: support@ubuntu.com | 467 | To: support@ubuntu.com |
266 | 464 | From: Sample Person <test@canonical.com> | 468 | From: Sample Person <test@canonical.com> |
267 | 465 | Subject: [Bug 1] subject | 469 | Subject: [Bug 1] subject |
268 | @@ -474,12 +478,12 @@ | |||
269 | 474 | Team, which is the registrant for Ubuntu. | 478 | Team, which is the registrant for Ubuntu. |
270 | 475 | <BLANKLINE> | 479 | <BLANKLINE> |
271 | 476 | ---------------------------------------------------------------------- | 480 | ---------------------------------------------------------------------- |
272 | 477 | To: mark@hbd.com | ||
273 | 478 | ... | ||
274 | 479 | To: test@canonical.com | 481 | To: test@canonical.com |
275 | 480 | ... | 482 | ... |
276 | 481 | To: foo.bar@canonical.com | 483 | To: foo.bar@canonical.com |
277 | 482 | ... | 484 | ... |
278 | 485 | To: mark@hbd.com | ||
279 | 486 | ... | ||
280 | 483 | To: support@ubuntu.com | 487 | To: support@ubuntu.com |
281 | 484 | From: Foo Bar <foo.bar@canonical.com> | 488 | From: Foo Bar <foo.bar@canonical.com> |
282 | 485 | Subject: [Bug 1] Re: Firefox does not support SVG | 489 | Subject: [Bug 1] Re: Firefox does not support SVG |
283 | @@ -494,12 +498,12 @@ | |||
284 | 494 | Team, which is the registrant for Ubuntu. | 498 | Team, which is the registrant for Ubuntu. |
285 | 495 | <BLANKLINE> | 499 | <BLANKLINE> |
286 | 496 | ---------------------------------------------------------------------- | 500 | ---------------------------------------------------------------------- |
287 | 497 | To: mark@hbd.com | ||
288 | 498 | ... | ||
289 | 499 | To: test@canonical.com | 501 | To: test@canonical.com |
290 | 500 | ... | 502 | ... |
291 | 501 | To: foo.bar@canonical.com | 503 | To: foo.bar@canonical.com |
292 | 502 | ... | 504 | ... |
293 | 505 | To: mark@hbd.com | ||
294 | 506 | ... | ||
295 | 503 | To: support@ubuntu.com | 507 | To: support@ubuntu.com |
296 | 504 | From: Sample Person <test@canonical.com> | 508 | From: Sample Person <test@canonical.com> |
297 | 505 | Subject: [Bug 1] Re: Firefox does not support SVG | 509 | Subject: [Bug 1] Re: Firefox does not support SVG |
298 | @@ -514,12 +518,8 @@ | |||
299 | 514 | Team, which is the registrant for Ubuntu. | 518 | Team, which is the registrant for Ubuntu. |
300 | 515 | <BLANKLINE> | 519 | <BLANKLINE> |
301 | 516 | ---------------------------------------------------------------------- | 520 | ---------------------------------------------------------------------- |
302 | 517 | To: mark@hbd.com | ||
303 | 518 | ... | ||
304 | 519 | To: test@canonical.com | 521 | To: test@canonical.com |
305 | 520 | ... | 522 | ... |
306 | 521 | To: foo.bar@canonical.com | ||
307 | 522 | ... | ||
308 | 523 | 523 | ||
309 | 524 | >>> flush_notifications() | 524 | >>> flush_notifications() |
310 | 525 | 525 | ||
311 | @@ -602,75 +602,75 @@ | |||
312 | 602 | ... for message in messages: | 602 | ... for message in messages: |
313 | 603 | ... print_notification_headers(message) | 603 | ... print_notification_headers(message) |
314 | 604 | 604 | ||
384 | 605 | To: support@ubuntu.com | 605 | To: mark@hbd.com |
385 | 606 | From: Sample Person <test@canonical.com> | 606 | From: Sample Person <test@canonical.com> |
386 | 607 | Subject: [Bug 2] Re: Blackhole Trash folder | 607 | Subject: [Bug 2] Re: Blackhole Trash folder |
387 | 608 | X-Launchpad-Message-Rationale: Registrant (Tomcat) @ubuntu-team | 608 | X-Launchpad-Message-Rationale: Registrant (Debian) |
388 | 609 | <BLANKLINE> | 609 | <BLANKLINE> |
389 | 610 | To: mark@hbd.com | 610 | To: support@ubuntu.com |
390 | 611 | From: Sample Person <test@canonical.com> | 611 | From: Sample Person <test@canonical.com> |
391 | 612 | Subject: [Bug 2] Re: Blackhole Trash folder | 612 | Subject: [Bug 2] Re: Blackhole Trash folder |
392 | 613 | X-Launchpad-Message-Rationale: Registrant (Debian) | 613 | X-Launchpad-Message-Rationale: Registrant (Tomcat) @ubuntu-team |
393 | 614 | <BLANKLINE> | 614 | <BLANKLINE> |
394 | 615 | To: test@canonical.com | 615 | To: test@canonical.com |
395 | 616 | From: Sample Person <test@canonical.com> | 616 | From: Sample Person <test@canonical.com> |
396 | 617 | Subject: [Bug 2] Re: Blackhole Trash folder | 617 | Subject: [Bug 2] Re: Blackhole Trash folder |
397 | 618 | X-Launchpad-Message-Rationale: Assignee | 618 | X-Launchpad-Message-Rationale: Assignee |
398 | 619 | <BLANKLINE> | 619 | <BLANKLINE> |
399 | 620 | To: support@ubuntu.com | 620 | To: mark@hbd.com |
400 | 621 | From: Foo Bar <foo.bar@canonical.com> | 621 | From: Foo Bar <foo.bar@canonical.com> |
401 | 622 | Subject: [Bug 2] Re: Blackhole Trash folder | 622 | Subject: [Bug 2] Re: Blackhole Trash folder |
402 | 623 | X-Launchpad-Message-Rationale: Registrant (Tomcat) @ubuntu-team | 623 | X-Launchpad-Message-Rationale: Registrant (Debian) |
403 | 624 | <BLANKLINE> | 624 | <BLANKLINE> |
404 | 625 | To: mark@hbd.com | 625 | To: support@ubuntu.com |
405 | 626 | From: Foo Bar <foo.bar@canonical.com> | 626 | From: Foo Bar <foo.bar@canonical.com> |
406 | 627 | Subject: [Bug 2] Re: Blackhole Trash folder | 627 | Subject: [Bug 2] Re: Blackhole Trash folder |
407 | 628 | X-Launchpad-Message-Rationale: Registrant (Debian) | 628 | X-Launchpad-Message-Rationale: Registrant (Tomcat) @ubuntu-team |
408 | 629 | <BLANKLINE> | 629 | <BLANKLINE> |
409 | 630 | To: test@canonical.com | 630 | To: test@canonical.com |
410 | 631 | From: Foo Bar <foo.bar@canonical.com> | 631 | From: Foo Bar <foo.bar@canonical.com> |
411 | 632 | Subject: [Bug 2] Re: Blackhole Trash folder | 632 | Subject: [Bug 2] Re: Blackhole Trash folder |
412 | 633 | X-Launchpad-Message-Rationale: Assignee | 633 | X-Launchpad-Message-Rationale: Assignee |
413 | 634 | <BLANKLINE> | 634 | <BLANKLINE> |
414 | 635 | To: support@ubuntu.com | 635 | To: foo.bar@canonical.com |
415 | 636 | From: Sample Person <test@canonical.com> | 636 | From: Sample Person <test@canonical.com> |
416 | 637 | Subject: [Bug 1] Re: Firefox does not support SVG | 637 | Subject: [Bug 1] Re: Firefox does not support SVG |
417 | 638 | X-Launchpad-Message-Rationale: Registrant (Ubuntu) @ubuntu-team | 638 | X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu) |
418 | 639 | <BLANKLINE> | 639 | <BLANKLINE> |
419 | 640 | To: mark@hbd.com | 640 | To: mark@hbd.com |
420 | 641 | From: Sample Person <test@canonical.com> | 641 | From: Sample Person <test@canonical.com> |
421 | 642 | Subject: [Bug 1] Re: Firefox does not support SVG | 642 | Subject: [Bug 1] Re: Firefox does not support SVG |
422 | 643 | X-Launchpad-Message-Rationale: Assignee | 643 | X-Launchpad-Message-Rationale: Assignee |
423 | 644 | <BLANKLINE> | 644 | <BLANKLINE> |
424 | 645 | To: test@canonical.com | 645 | To: support@ubuntu.com |
425 | 646 | From: Sample Person <test@canonical.com> | 646 | From: Sample Person <test@canonical.com> |
426 | 647 | Subject: [Bug 1] Re: Firefox does not support SVG | 647 | Subject: [Bug 1] Re: Firefox does not support SVG |
427 | 648 | X-Launchpad-Message-Rationale: Subscriber | 648 | X-Launchpad-Message-Rationale: Registrant (Ubuntu) @ubuntu-team |
428 | 649 | <BLANKLINE> | 649 | <BLANKLINE> |
429 | 650 | To: foo.bar@canonical.com | 650 | To: test@canonical.com |
430 | 651 | From: Sample Person <test@canonical.com> | 651 | From: Sample Person <test@canonical.com> |
431 | 652 | Subject: [Bug 1] Re: Firefox does not support SVG | 652 | Subject: [Bug 1] Re: Firefox does not support SVG |
432 | 653 | X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu) | 653 | X-Launchpad-Message-Rationale: Subscriber |
433 | 654 | <BLANKLINE> | 654 | <BLANKLINE> |
434 | 655 | To: support@ubuntu.com | 655 | To: foo.bar@canonical.com |
435 | 656 | From: Foo Bar <foo.bar@canonical.com> | 656 | From: Foo Bar <foo.bar@canonical.com> |
436 | 657 | Subject: [Bug 1] Re: Firefox does not support SVG | 657 | Subject: [Bug 1] Re: Firefox does not support SVG |
437 | 658 | X-Launchpad-Message-Rationale: Registrant (Ubuntu) @ubuntu-team | 658 | X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu) |
438 | 659 | <BLANKLINE> | 659 | <BLANKLINE> |
439 | 660 | To: mark@hbd.com | 660 | To: mark@hbd.com |
440 | 661 | From: Foo Bar <foo.bar@canonical.com> | 661 | From: Foo Bar <foo.bar@canonical.com> |
441 | 662 | Subject: [Bug 1] Re: Firefox does not support SVG | 662 | Subject: [Bug 1] Re: Firefox does not support SVG |
442 | 663 | X-Launchpad-Message-Rationale: Assignee | 663 | X-Launchpad-Message-Rationale: Assignee |
443 | 664 | <BLANKLINE> | 664 | <BLANKLINE> |
444 | 665 | To: test@canonical.com | 665 | To: support@ubuntu.com |
445 | 666 | From: Foo Bar <foo.bar@canonical.com> | 666 | From: Foo Bar <foo.bar@canonical.com> |
446 | 667 | Subject: [Bug 1] Re: Firefox does not support SVG | 667 | Subject: [Bug 1] Re: Firefox does not support SVG |
447 | 668 | X-Launchpad-Message-Rationale: Subscriber | 668 | X-Launchpad-Message-Rationale: Registrant (Ubuntu) @ubuntu-team |
448 | 669 | <BLANKLINE> | 669 | <BLANKLINE> |
449 | 670 | To: foo.bar@canonical.com | 670 | To: test@canonical.com |
450 | 671 | From: Foo Bar <foo.bar@canonical.com> | 671 | From: Foo Bar <foo.bar@canonical.com> |
451 | 672 | Subject: [Bug 1] Re: Firefox does not support SVG | 672 | Subject: [Bug 1] Re: Firefox does not support SVG |
452 | 673 | X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu) | 673 | X-Launchpad-Message-Rationale: Subscriber |
453 | 674 | <BLANKLINE> | 674 | <BLANKLINE> |
454 | 675 | 675 | ||
455 | 676 | There's a blank line before the signature, and the signature marker has | 676 | There's a blank line before the signature, and the signature marker has |
456 | @@ -689,8 +689,8 @@ | |||
457 | 689 | '-- ', | 689 | '-- ', |
458 | 690 | 'Firefox does not support SVG', | 690 | 'Firefox does not support SVG', |
459 | 691 | 'http://bugs.launchpad.dev/bugs/1', | 691 | 'http://bugs.launchpad.dev/bugs/1', |
462 | 692 | 'You received this bug notification because you are subscribed to', | 692 | 'You received this bug notification because you are a direct subscriber', |
463 | 693 | 'mozilla-firefox in ubuntu.'] | 693 | 'of the bug.'] |
464 | 694 | 694 | ||
465 | 695 | >>> flush_notifications() | 695 | >>> flush_notifications() |
466 | 696 | 696 | ||
467 | @@ -720,11 +720,11 @@ | |||
468 | 720 | >>> for bug_notifications, messages in email_notifications: | 720 | >>> for bug_notifications, messages in email_notifications: |
469 | 721 | ... for message in messages: | 721 | ... for message in messages: |
470 | 722 | ... print message['To'] | 722 | ... print message['To'] |
471 | 723 | foo.bar@canonical.com | ||
472 | 723 | marilize@hbd.com | 724 | marilize@hbd.com |
473 | 724 | mark@hbd.com | 725 | mark@hbd.com |
474 | 726 | support@ubuntu.com | ||
475 | 725 | test@canonical.com | 727 | test@canonical.com |
476 | 726 | support@ubuntu.com | ||
477 | 727 | foo.bar@canonical.com | ||
478 | 728 | 728 | ||
479 | 729 | >>> flush_notifications() | 729 | >>> flush_notifications() |
480 | 730 | 730 | ||
481 | @@ -778,6 +778,23 @@ | |||
482 | 778 | >>> for bug_notifications, messages in get_email_notifications(notifications): | 778 | >>> for bug_notifications, messages in get_email_notifications(notifications): |
483 | 779 | ... for message in messages: | 779 | ... for message in messages: |
484 | 780 | ... print_notification(message) | 780 | ... print_notification(message) |
485 | 781 | To: foo.bar@canonical.com | ||
486 | 782 | From: Sample Person <test@canonical.com> | ||
487 | 783 | Subject: [Bug 16] subject | ||
488 | 784 | X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu) via Bug 1 | ||
489 | 785 | <BLANKLINE> | ||
490 | 786 | *** This bug is a duplicate of bug 1 *** | ||
491 | 787 | http://bugs.launchpad.dev/bugs/1 | ||
492 | 788 | <BLANKLINE> | ||
493 | 789 | a comment. | ||
494 | 790 | <BLANKLINE> | ||
495 | 791 | -- | ||
496 | 792 | new bug | ||
497 | 793 | http://bugs.launchpad.dev/bugs/16 | ||
498 | 794 | You received this bug notification because you are subscribed to | ||
499 | 795 | mozilla-firefox in ubuntu (via bug 1). | ||
500 | 796 | <BLANKLINE> | ||
501 | 797 | ---------------------------------------------------------------------- | ||
502 | 781 | To: marilize@hbd.com | 798 | To: marilize@hbd.com |
503 | 782 | From: Sample Person <test@canonical.com> | 799 | From: Sample Person <test@canonical.com> |
504 | 783 | Subject: [Bug 16] subject | 800 | Subject: [Bug 16] subject |
505 | @@ -812,6 +829,23 @@ | |||
506 | 812 | bug 1). | 829 | bug 1). |
507 | 813 | <BLANKLINE> | 830 | <BLANKLINE> |
508 | 814 | ---------------------------------------------------------------------- | 831 | ---------------------------------------------------------------------- |
509 | 832 | To: support@ubuntu.com | ||
510 | 833 | From: Sample Person <test@canonical.com> | ||
511 | 834 | Subject: [Bug 16] subject | ||
512 | 835 | X-Launchpad-Message-Rationale: Registrant (Ubuntu) @ubuntu-team | ||
513 | 836 | <BLANKLINE> | ||
514 | 837 | *** This bug is a duplicate of bug 1 *** | ||
515 | 838 | http://bugs.launchpad.dev/bugs/1 | ||
516 | 839 | <BLANKLINE> | ||
517 | 840 | a comment. | ||
518 | 841 | <BLANKLINE> | ||
519 | 842 | -- | ||
520 | 843 | new bug | ||
521 | 844 | http://bugs.launchpad.dev/bugs/16 | ||
522 | 845 | You received this bug notification because you are a member of Ubuntu | ||
523 | 846 | Team, which is the registrant for Ubuntu. | ||
524 | 847 | <BLANKLINE> | ||
525 | 848 | ---------------------------------------------------------------------- | ||
526 | 815 | To: test@canonical.com | 849 | To: test@canonical.com |
527 | 816 | From: Sample Person <test@canonical.com> | 850 | From: Sample Person <test@canonical.com> |
528 | 817 | Subject: [Bug 16] subject | 851 | Subject: [Bug 16] subject |
529 | @@ -829,40 +863,6 @@ | |||
530 | 829 | of the bug. | 863 | of the bug. |
531 | 830 | <BLANKLINE> | 864 | <BLANKLINE> |
532 | 831 | ---------------------------------------------------------------------- | 865 | ---------------------------------------------------------------------- |
533 | 832 | To: support@ubuntu.com | ||
534 | 833 | From: Sample Person <test@canonical.com> | ||
535 | 834 | Subject: [Bug 16] subject | ||
536 | 835 | X-Launchpad-Message-Rationale: Registrant (Ubuntu) @ubuntu-team | ||
537 | 836 | <BLANKLINE> | ||
538 | 837 | *** This bug is a duplicate of bug 1 *** | ||
539 | 838 | http://bugs.launchpad.dev/bugs/1 | ||
540 | 839 | <BLANKLINE> | ||
541 | 840 | a comment. | ||
542 | 841 | <BLANKLINE> | ||
543 | 842 | -- | ||
544 | 843 | new bug | ||
545 | 844 | http://bugs.launchpad.dev/bugs/16 | ||
546 | 845 | You received this bug notification because you are a member of Ubuntu | ||
547 | 846 | Team, which is the registrant for Ubuntu. | ||
548 | 847 | <BLANKLINE> | ||
549 | 848 | ---------------------------------------------------------------------- | ||
550 | 849 | To: foo.bar@canonical.com | ||
551 | 850 | From: Sample Person <test@canonical.com> | ||
552 | 851 | Subject: [Bug 16] subject | ||
553 | 852 | X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu) via Bug 1 | ||
554 | 853 | <BLANKLINE> | ||
555 | 854 | *** This bug is a duplicate of bug 1 *** | ||
556 | 855 | http://bugs.launchpad.dev/bugs/1 | ||
557 | 856 | <BLANKLINE> | ||
558 | 857 | a comment. | ||
559 | 858 | <BLANKLINE> | ||
560 | 859 | -- | ||
561 | 860 | new bug | ||
562 | 861 | http://bugs.launchpad.dev/bugs/16 | ||
563 | 862 | You received this bug notification because you are subscribed to | ||
564 | 863 | mozilla-firefox in ubuntu (via bug 1). | ||
565 | 864 | <BLANKLINE> | ||
566 | 865 | ---------------------------------------------------------------------- | ||
567 | 866 | 866 | ||
568 | 867 | Also note that notification was sent to Mark as well, since he's a | 867 | Also note that notification was sent to Mark as well, since he's a |
569 | 868 | subscriber of bug one. | 868 | subscriber of bug one. |
570 | @@ -985,10 +985,10 @@ | |||
571 | 985 | 0 | 985 | 0 |
572 | 986 | >>> print err | 986 | >>> print err |
573 | 987 | INFO creating lockfile | 987 | INFO creating lockfile |
574 | 988 | INFO Notifying mark@hbd.com about bug 2. | ||
575 | 989 | ... | ||
576 | 988 | INFO Notifying support@ubuntu.com about bug 2. | 990 | INFO Notifying support@ubuntu.com about bug 2. |
577 | 989 | ... | 991 | ... |
578 | 990 | INFO Notifying mark@hbd.com about bug 2. | ||
579 | 991 | ... | ||
580 | 992 | INFO Notifying test@canonical.com about bug 2. | 992 | INFO Notifying test@canonical.com about bug 2. |
581 | 993 | ... | 993 | ... |
582 | 994 | From: Sample Person <test@canonical.com> | 994 | From: Sample Person <test@canonical.com> |
583 | @@ -999,14 +999,6 @@ | |||
584 | 999 | ... | 999 | ... |
585 | 1000 | X-Launchpad-Message-Rationale: Assignee | 1000 | X-Launchpad-Message-Rationale: Assignee |
586 | 1001 | ... | 1001 | ... |
587 | 1002 | INFO Notifying marilize@hbd.com about bug 1. | ||
588 | 1003 | ... | ||
589 | 1004 | INFO Notifying mark@hbd.com about bug 1. | ||
590 | 1005 | ... | ||
591 | 1006 | INFO Notifying test@canonical.com about bug 1. | ||
592 | 1007 | ... | ||
593 | 1008 | INFO Notifying support@ubuntu.com about bug 1. | ||
594 | 1009 | ... | ||
595 | 1010 | INFO Notifying foo.bar@canonical.com about bug 1. | 1002 | INFO Notifying foo.bar@canonical.com about bug 1. |
596 | 1011 | ... | 1003 | ... |
597 | 1012 | From: Sample Person <test@canonical.com> | 1004 | From: Sample Person <test@canonical.com> |
598 | @@ -1021,9 +1013,9 @@ | |||
599 | 1021 | ... | 1013 | ... |
600 | 1022 | INFO Notifying mark@hbd.com about bug 1. | 1014 | INFO Notifying mark@hbd.com about bug 1. |
601 | 1023 | ... | 1015 | ... |
602 | 1016 | INFO Notifying support@ubuntu.com about bug 1. | ||
603 | 1017 | ... | ||
604 | 1024 | INFO Notifying test@canonical.com about bug 1. | 1018 | INFO Notifying test@canonical.com about bug 1. |
605 | 1025 | ... | ||
606 | 1026 | INFO Notifying support@ubuntu.com about bug 1. | ||
607 | 1027 | ... | 1019 | ... |
608 | 1028 | INFO Notifying foo.bar@canonical.com about bug 1. | 1020 | INFO Notifying foo.bar@canonical.com about bug 1. |
609 | 1029 | ... | 1021 | ... |
610 | @@ -1049,6 +1041,14 @@ | |||
611 | 1049 | http://bugs.launchpad.dev/bugs/1 | 1041 | http://bugs.launchpad.dev/bugs/1 |
612 | 1050 | You received this bug notification because you are subscribed to | 1042 | You received this bug notification because you are subscribed to |
613 | 1051 | mozilla-firefox in ubuntu. | 1043 | mozilla-firefox in ubuntu. |
614 | 1044 | <BLANKLINE> | ||
615 | 1045 | INFO Notifying marilize@hbd.com about bug 1. | ||
616 | 1046 | ... | ||
617 | 1047 | INFO Notifying mark@hbd.com about bug 1. | ||
618 | 1048 | ... | ||
619 | 1049 | INFO Notifying support@ubuntu.com about bug 1. | ||
620 | 1050 | ... | ||
621 | 1051 | INFO Notifying test@canonical.com about bug 1. | ||
622 | 1052 | ... | 1052 | ... |
623 | 1053 | 1053 | ||
624 | 1054 | >>> flush_notifications() | 1054 | >>> flush_notifications() |
625 | @@ -1272,8 +1272,21 @@ | |||
626 | 1272 | >>> bug_15.subscribe(ddaa, sample_person) | 1272 | >>> bug_15.subscribe(ddaa, sample_person) |
627 | 1273 | <...> | 1273 | <...> |
628 | 1274 | 1274 | ||
631 | 1275 | If we then add a comment to the bug, ddaa will receieve a notification | 1275 | Notifications sent through a team membership respect the member's |
632 | 1276 | containing that comment. | 1276 | verbose_bugnotifications, not the team's. salgado gets notifications |
633 | 1277 | through his membership in landscape-developers. salgado decides that | ||
634 | 1278 | he wants verbose notifications. | ||
635 | 1279 | |||
636 | 1280 | >>> salgado = getUtility(IPersonSet).getByName('salgado') | ||
637 | 1281 | >>> salgado.verbose_bugnotifications | ||
638 | 1282 | True | ||
639 | 1283 | |||
640 | 1284 | >>> ls = getUtility(IPersonSet).getByName('landscape-developers') | ||
641 | 1285 | >>> ls.verbose_bugnotifications | ||
642 | 1286 | False | ||
643 | 1287 | |||
644 | 1288 | If we then add a comment to the bug, ddaa and salgado will receieve | ||
645 | 1289 | notifications containing that comment. | ||
646 | 1277 | 1290 | ||
647 | 1278 | >>> comment = getUtility(IMessageSet).fromText( | 1291 | >>> comment = getUtility(IMessageSet).fromText( |
648 | 1279 | ... 'subject', 'a really simple comment.', sample_person, | 1292 | ... 'subject', 'a really simple comment.', sample_person, |
649 | @@ -1286,10 +1299,11 @@ | |||
650 | 1286 | 1 | 1299 | 1 |
651 | 1287 | 1300 | ||
652 | 1288 | If we pass this notifcation to get_email_notifications we can see that | 1301 | If we pass this notifcation to get_email_notifications we can see that |
657 | 1289 | ddaa will receieve a notification which contains the bug description and | 1302 | ddaa and salgado will receieve a notification which contains the bug |
658 | 1290 | its status in all of its targets. All other subscribers will receive | 1303 | description and its status in all of its targets. All other subscribers |
659 | 1291 | standard notifications that don't include the bug description. To help | 1304 | will receive standard notifications that don't include the bug |
660 | 1292 | with demonstrating this, we'll define a helper function. | 1305 | description. To help with demonstrating this, we'll define a helper |
661 | 1306 | function. | ||
662 | 1293 | 1307 | ||
663 | 1294 | >>> def collate_messages_by_recipient(messages): | 1308 | >>> def collate_messages_by_recipient(messages): |
664 | 1295 | ... messages_by_recipient = {} | 1309 | ... messages_by_recipient = {} |
665 | @@ -1350,6 +1364,31 @@ | |||
666 | 1350 | <BLANKLINE> | 1364 | <BLANKLINE> |
667 | 1351 | ---------------------------------------------------------------------- | 1365 | ---------------------------------------------------------------------- |
668 | 1352 | 1366 | ||
669 | 1367 | And salgado does too: | ||
670 | 1368 | |||
671 | 1369 | >>> print_notification( | ||
672 | 1370 | ... collated_messages['guilherme.salgado@canonical.com'][0]) | ||
673 | 1371 | To: guilherme.salgado@canonical.com | ||
674 | 1372 | From: Sample Person <test@canonical.com> | ||
675 | 1373 | Subject: [Bug 15] subject | ||
676 | 1374 | X-Launchpad-Message-Rationale: Subscriber (Redfish) @landscape-developers | ||
677 | 1375 | <BLANKLINE> | ||
678 | 1376 | a really simple comment. | ||
679 | 1377 | <BLANKLINE> | ||
680 | 1378 | -- | ||
681 | 1379 | Nonsensical bugs are useless | ||
682 | 1380 | http://bugs.launchpad.dev/bugs/15 | ||
683 | 1381 | You received this bug notification because you are a member of Landscape | ||
684 | 1382 | Developers, which is subscribed to Redfish. | ||
685 | 1383 | <BLANKLINE> | ||
686 | 1384 | Status in Redfish: New | ||
687 | 1385 | Status in Mozilla Thunderbird: New | ||
688 | 1386 | <BLANKLINE> | ||
689 | 1387 | Bug description: | ||
690 | 1388 | Like this one, natch. | ||
691 | 1389 | <BLANKLINE> | ||
692 | 1390 | ---------------------------------------------------------------------- | ||
693 | 1391 | |||
694 | 1353 | == Notification Recipients == | 1392 | == Notification Recipients == |
695 | 1354 | 1393 | ||
696 | 1355 | Bug notifications are sent to direct subscribers of a bug as well as to | 1394 | Bug notifications are sent to direct subscribers of a bug as well as to |
697 | @@ -1386,16 +1425,21 @@ | |||
698 | 1386 | >>> for bug_notifications, messages in email_notifications: | 1425 | >>> for bug_notifications, messages in email_notifications: |
699 | 1387 | ... for message in messages: | 1426 | ... for message in messages: |
700 | 1388 | ... print_notification(message) | 1427 | ... print_notification(message) |
711 | 1389 | To: support@ubuntu.com | 1428 | To: foo.bar@canonical.com |
712 | 1390 | ... | 1429 | ... |
713 | 1391 | You received this bug notification because you are a member of Ubuntu | 1430 | You received this bug notification because you are subscribed to |
714 | 1392 | Team, which is the registrant for Ubuntu. | 1431 | mozilla-firefox in ubuntu. |
715 | 1393 | <BLANKLINE> | 1432 | <BLANKLINE> |
716 | 1394 | ---------------------------------------------------------------------- | 1433 | ---------------------------------------------------------------------- |
717 | 1395 | To: test@canonical.com | 1434 | To: marilize@hbd.com |
718 | 1396 | ... | 1435 | ... |
719 | 1397 | You received this bug notification because you are a direct subscriber | 1436 | You received this bug notification because you are a member of ShipIt |
720 | 1398 | of the bug. | 1437 | Administrators, which is a direct subscriber. |
721 | 1438 | <BLANKLINE> | ||
722 | 1439 | ---------------------------------------------------------------------- | ||
723 | 1440 | To: mark@hbd.com | ||
724 | 1441 | ... | ||
725 | 1442 | You received this bug notification because you are a bug assignee. | ||
726 | 1399 | <BLANKLINE> | 1443 | <BLANKLINE> |
727 | 1400 | ---------------------------------------------------------------------- | 1444 | ---------------------------------------------------------------------- |
728 | 1401 | To: no-priv@canonical.com | 1445 | To: no-priv@canonical.com |
729 | @@ -1412,21 +1456,16 @@ | |||
730 | 1412 | Firefox. | 1456 | Firefox. |
731 | 1413 | <BLANKLINE> | 1457 | <BLANKLINE> |
732 | 1414 | ---------------------------------------------------------------------- | 1458 | ---------------------------------------------------------------------- |
748 | 1415 | To: mark@hbd.com | 1459 | To: support@ubuntu.com |
749 | 1416 | ... | 1460 | ... |
750 | 1417 | You received this bug notification because you are a bug assignee. | 1461 | You received this bug notification because you are a member of Ubuntu |
751 | 1418 | <BLANKLINE> | 1462 | Team, which is the registrant for Ubuntu. |
752 | 1419 | ---------------------------------------------------------------------- | 1463 | <BLANKLINE> |
753 | 1420 | To: foo.bar@canonical.com | 1464 | ---------------------------------------------------------------------- |
754 | 1421 | ... | 1465 | To: test@canonical.com |
755 | 1422 | You received this bug notification because you are subscribed to | 1466 | ... |
756 | 1423 | mozilla-firefox in ubuntu. | 1467 | You received this bug notification because you are a direct subscriber |
757 | 1424 | <BLANKLINE> | 1468 | of the bug. |
743 | 1425 | ---------------------------------------------------------------------- | ||
744 | 1426 | To: marilize@hbd.com | ||
745 | 1427 | ... | ||
746 | 1428 | You received this bug notification because you are a member of ShipIt | ||
747 | 1429 | Administrators, which is a direct subscriber. | ||
758 | 1430 | <BLANKLINE> | 1469 | <BLANKLINE> |
759 | 1431 | ---------------------------------------------------------------------- | 1470 | ---------------------------------------------------------------------- |
760 | 1432 | 1471 | ||
761 | @@ -1449,6 +1488,12 @@ | |||
762 | 1449 | >>> for bug_notifications, messages in email_notifications: | 1488 | >>> for bug_notifications, messages in email_notifications: |
763 | 1450 | ... for message in messages: | 1489 | ... for message in messages: |
764 | 1451 | ... print_notification(message) | 1490 | ... print_notification(message) |
765 | 1491 | To: foo.bar@canonical.com | ||
766 | 1492 | ... | ||
767 | 1493 | You received this bug notification because you are subscribed to | ||
768 | 1494 | mozilla-firefox in ubuntu. | ||
769 | 1495 | <BLANKLINE> | ||
770 | 1496 | ---------------------------------------------------------------------- | ||
771 | 1452 | To: marilize@hbd.com | 1497 | To: marilize@hbd.com |
772 | 1453 | From: Sample Person <test@canonical.com> | 1498 | From: Sample Person <test@canonical.com> |
773 | 1454 | Subject: [Bug 1] subject | 1499 | Subject: [Bug 1] subject |
774 | @@ -1468,24 +1513,18 @@ | |||
775 | 1468 | You received this bug notification because you are a bug assignee. | 1513 | You received this bug notification because you are a bug assignee. |
776 | 1469 | <BLANKLINE> | 1514 | <BLANKLINE> |
777 | 1470 | ---------------------------------------------------------------------- | 1515 | ---------------------------------------------------------------------- |
778 | 1516 | To: support@ubuntu.com | ||
779 | 1517 | ... | ||
780 | 1518 | You received this bug notification because you are a member of Ubuntu | ||
781 | 1519 | Team, which is the registrant for Ubuntu. | ||
782 | 1520 | <BLANKLINE> | ||
783 | 1521 | ---------------------------------------------------------------------- | ||
784 | 1471 | To: test@canonical.com | 1522 | To: test@canonical.com |
785 | 1472 | ... | 1523 | ... |
786 | 1473 | You received this bug notification because you are a direct subscriber | 1524 | You received this bug notification because you are a direct subscriber |
787 | 1474 | of the bug. | 1525 | of the bug. |
788 | 1475 | <BLANKLINE> | 1526 | <BLANKLINE> |
789 | 1476 | ---------------------------------------------------------------------- | 1527 | ---------------------------------------------------------------------- |
790 | 1477 | To: support@ubuntu.com | ||
791 | 1478 | ... | ||
792 | 1479 | You received this bug notification because you are a member of Ubuntu | ||
793 | 1480 | Team, which is the registrant for Ubuntu. | ||
794 | 1481 | <BLANKLINE> | ||
795 | 1482 | ---------------------------------------------------------------------- | ||
796 | 1483 | To: foo.bar@canonical.com | ||
797 | 1484 | ... | ||
798 | 1485 | You received this bug notification because you are subscribed to | ||
799 | 1486 | mozilla-firefox in ubuntu. | ||
800 | 1487 | <BLANKLINE> | ||
801 | 1488 | ---------------------------------------------------------------------- | ||
802 | 1489 | 1528 | ||
803 | 1490 | The notifications generated by addChangeNotification() are sent only to | 1529 | The notifications generated by addChangeNotification() are sent only to |
804 | 1491 | structural subscribers with the notification level METADATA or higher. | 1530 | structural subscribers with the notification level METADATA or higher. |
805 | @@ -1500,16 +1539,21 @@ | |||
806 | 1500 | >>> for bug_notifications, messages in email_notifications: | 1539 | >>> for bug_notifications, messages in email_notifications: |
807 | 1501 | ... for message in messages: | 1540 | ... for message in messages: |
808 | 1502 | ... print_notification(message) | 1541 | ... print_notification(message) |
819 | 1503 | To: support@ubuntu.com | 1542 | To: foo.bar@canonical.com |
820 | 1504 | ... | 1543 | ... |
821 | 1505 | You received this bug notification because you are a member of Ubuntu | 1544 | You received this bug notification because you are subscribed to |
822 | 1506 | Team, which is the registrant for Ubuntu. | 1545 | mozilla-firefox in ubuntu. |
823 | 1507 | <BLANKLINE> | 1546 | <BLANKLINE> |
824 | 1508 | ---------------------------------------------------------------------- | 1547 | ---------------------------------------------------------------------- |
825 | 1509 | To: test@canonical.com | 1548 | To: marilize@hbd.com |
826 | 1510 | ... | 1549 | ... |
827 | 1511 | You received this bug notification because you are a direct subscriber | 1550 | You received this bug notification because you are a member of ShipIt |
828 | 1512 | of the bug. | 1551 | Administrators, which is a direct subscriber. |
829 | 1552 | <BLANKLINE> | ||
830 | 1553 | ---------------------------------------------------------------------- | ||
831 | 1554 | To: mark@hbd.com | ||
832 | 1555 | ... | ||
833 | 1556 | You received this bug notification because you are a bug assignee. | ||
834 | 1513 | <BLANKLINE> | 1557 | <BLANKLINE> |
835 | 1514 | ---------------------------------------------------------------------- | 1558 | ---------------------------------------------------------------------- |
836 | 1515 | To: no-priv@canonical.com | 1559 | To: no-priv@canonical.com |
837 | @@ -1528,21 +1572,16 @@ | |||
838 | 1528 | Firefox. | 1572 | Firefox. |
839 | 1529 | <BLANKLINE> | 1573 | <BLANKLINE> |
840 | 1530 | ---------------------------------------------------------------------- | 1574 | ---------------------------------------------------------------------- |
856 | 1531 | To: mark@hbd.com | 1575 | To: support@ubuntu.com |
857 | 1532 | ... | 1576 | ... |
858 | 1533 | You received this bug notification because you are a bug assignee. | 1577 | You received this bug notification because you are a member of Ubuntu |
859 | 1534 | <BLANKLINE> | 1578 | Team, which is the registrant for Ubuntu. |
860 | 1535 | ---------------------------------------------------------------------- | 1579 | <BLANKLINE> |
861 | 1536 | To: foo.bar@canonical.com | 1580 | ---------------------------------------------------------------------- |
862 | 1537 | ... | 1581 | To: test@canonical.com |
863 | 1538 | You received this bug notification because you are subscribed to | 1582 | ... |
864 | 1539 | mozilla-firefox in ubuntu. | 1583 | You received this bug notification because you are a direct subscriber |
865 | 1540 | <BLANKLINE> | 1584 | of the bug. |
851 | 1541 | ---------------------------------------------------------------------- | ||
852 | 1542 | To: marilize@hbd.com | ||
853 | 1543 | ... | ||
854 | 1544 | You received this bug notification because you are a member of ShipIt | ||
855 | 1545 | Administrators, which is a direct subscriber. | ||
866 | 1546 | <BLANKLINE> | 1585 | <BLANKLINE> |
867 | 1547 | ---------------------------------------------------------------------- | 1586 | ---------------------------------------------------------------------- |
868 | 1548 | 1587 | ||
869 | @@ -1563,6 +1602,12 @@ | |||
870 | 1563 | >>> for bug_notifications, messages in email_notifications: | 1602 | >>> for bug_notifications, messages in email_notifications: |
871 | 1564 | ... for message in messages: | 1603 | ... for message in messages: |
872 | 1565 | ... print_notification(message) | 1604 | ... print_notification(message) |
873 | 1605 | To: foo.bar@canonical.com | ||
874 | 1606 | ... | ||
875 | 1607 | You received this bug notification because you are subscribed to | ||
876 | 1608 | mozilla-firefox in ubuntu. | ||
877 | 1609 | <BLANKLINE> | ||
878 | 1610 | ---------------------------------------------------------------------- | ||
879 | 1566 | To: marilize@hbd.com | 1611 | To: marilize@hbd.com |
880 | 1567 | From: Sample Person <test@canonical.com> | 1612 | From: Sample Person <test@canonical.com> |
881 | 1568 | Subject: [Bug 1] Re: Firefox does not support SVG | 1613 | Subject: [Bug 1] Re: Firefox does not support SVG |
882 | @@ -1582,21 +1627,15 @@ | |||
883 | 1582 | You received this bug notification because you are a bug assignee. | 1627 | You received this bug notification because you are a bug assignee. |
884 | 1583 | <BLANKLINE> | 1628 | <BLANKLINE> |
885 | 1584 | ---------------------------------------------------------------------- | 1629 | ---------------------------------------------------------------------- |
886 | 1630 | To: support@ubuntu.com | ||
887 | 1631 | ... | ||
888 | 1632 | You received this bug notification because you are a member of Ubuntu | ||
889 | 1633 | Team, which is the registrant for Ubuntu. | ||
890 | 1634 | <BLANKLINE> | ||
891 | 1635 | ---------------------------------------------------------------------- | ||
892 | 1585 | To: test@canonical.com | 1636 | To: test@canonical.com |
893 | 1586 | ... | 1637 | ... |
894 | 1587 | You received this bug notification because you are a direct subscriber | 1638 | You received this bug notification because you are a direct subscriber |
895 | 1588 | of the bug. | 1639 | of the bug. |
896 | 1589 | <BLANKLINE> | 1640 | <BLANKLINE> |
897 | 1590 | ---------------------------------------------------------------------- | 1641 | ---------------------------------------------------------------------- |
898 | 1591 | To: support@ubuntu.com | ||
899 | 1592 | ... | ||
900 | 1593 | You received this bug notification because you are a member of Ubuntu | ||
901 | 1594 | Team, which is the registrant for Ubuntu. | ||
902 | 1595 | <BLANKLINE> | ||
903 | 1596 | ---------------------------------------------------------------------- | ||
904 | 1597 | To: foo.bar@canonical.com | ||
905 | 1598 | ... | ||
906 | 1599 | You received this bug notification because you are subscribed to | ||
907 | 1600 | mozilla-firefox in ubuntu. | ||
908 | 1601 | <BLANKLINE> | ||
909 | 1602 | ---------------------------------------------------------------------- | ||
910 | 1603 | 1642 | ||
911 | === modified file 'lib/lp/bugs/scripts/bugnotification.py' | |||
912 | --- lib/lp/bugs/scripts/bugnotification.py 2009-06-25 00:40:31 +0000 | |||
913 | +++ lib/lp/bugs/scripts/bugnotification.py 2009-07-23 13:02:15 +0000 | |||
914 | @@ -11,8 +11,7 @@ | |||
915 | 11 | 11 | ||
916 | 12 | from canonical.config import config | 12 | from canonical.config import config |
917 | 13 | from canonical.database.sqlbase import rollback, begin | 13 | from canonical.database.sqlbase import rollback, begin |
920 | 14 | from canonical.launchpad.helpers import ( | 14 | from canonical.launchpad.helpers import emailPeople, get_email_template |
919 | 15 | get_contact_email_addresses, get_email_template) | ||
921 | 16 | from lp.bugs.interfaces.bugmessage import IBugMessageSet | 15 | from lp.bugs.interfaces.bugmessage import IBugMessageSet |
922 | 17 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities | 16 | from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities |
923 | 18 | from lp.registry.interfaces.person import IPersonSet | 17 | from lp.registry.interfaces.person import IPersonSet |
924 | @@ -41,8 +40,8 @@ | |||
925 | 41 | recipients = {} | 40 | recipients = {} |
926 | 42 | for notification in bug_notifications: | 41 | for notification in bug_notifications: |
927 | 43 | for recipient in notification.recipients: | 42 | for recipient in notification.recipients: |
930 | 44 | for address in get_contact_email_addresses(recipient.person): | 43 | for emailperson in emailPeople(recipient.person): |
931 | 45 | recipients[address] = recipient | 44 | recipients[emailperson] = recipient |
932 | 46 | 45 | ||
933 | 47 | for notification in bug_notifications: | 46 | for notification in bug_notifications: |
934 | 48 | assert notification.bug == bug, bug.id | 47 | assert notification.bug == bug, bug.id |
935 | @@ -105,14 +104,18 @@ | |||
936 | 105 | config.malone.comment_syncing_team) | 104 | config.malone.comment_syncing_team) |
937 | 106 | # Only members of the comment syncing team should get comment | 105 | # Only members of the comment syncing team should get comment |
938 | 107 | # notifications related to bug watches or initial comment imports. | 106 | # notifications related to bug watches or initial comment imports. |
939 | 107 | # XXX wgrant 2009-07-23: Do we want to take the emailperson's or | ||
940 | 108 | # recipient's membership? | ||
941 | 108 | if (is_initial_import_notification or | 109 | if (is_initial_import_notification or |
942 | 109 | (bug_message is not None and bug_message.bugwatch is not None)): | 110 | (bug_message is not None and bug_message.bugwatch is not None)): |
943 | 110 | recipients = dict( | 111 | recipients = dict( |
946 | 111 | (address, recipient) | 112 | (emailperson, recipient) |
947 | 112 | for address, recipient in recipients.items() | 113 | for emailperson, recipient in recipients.items() |
948 | 113 | if recipient.person.inTeam(comment_syncing_team)) | 114 | if recipient.person.inTeam(comment_syncing_team)) |
949 | 114 | bug_notification_builder = BugNotificationBuilder(bug) | 115 | bug_notification_builder = BugNotificationBuilder(bug) |
951 | 115 | for address, recipient in recipients.items(): | 116 | for emailperson, recipient in sorted(recipients.items(), |
952 | 117 | key=lambda t: t[0].preferredemail.email): | ||
953 | 118 | address = str(emailperson.preferredemail.email) | ||
954 | 116 | reason = recipient.reason_body | 119 | reason = recipient.reason_body |
955 | 117 | rationale = recipient.reason_header | 120 | rationale = recipient.reason_header |
956 | 118 | 121 | ||
957 | @@ -125,8 +128,7 @@ | |||
958 | 125 | # If the person we're sending to receives verbose notifications | 128 | # If the person we're sending to receives verbose notifications |
959 | 126 | # we include the description and status of the bug in the email | 129 | # we include the description and status of the bug in the email |
960 | 127 | # footer. | 130 | # footer. |
963 | 128 | person = recipient.person | 131 | if emailperson.verbose_bugnotifications: |
962 | 129 | if person.verbose_bugnotifications: | ||
964 | 130 | email_template = 'bug-notification-verbose.txt' | 132 | email_template = 'bug-notification-verbose.txt' |
965 | 131 | body_data['bug_description'] = bug.description | 133 | body_data['bug_description'] = bug.description |
966 | 132 | 134 |
This branch fixes bug #253788, by making bugmail to a team member use the member's verbose_ bugnotification s, not the team's.
bugnotification -sending. txt relied on dict ordering in construct_ email_notificat ions, and I needed to rekey that dict with Persons. As they don't hash reliably, the order changed between test runs, so I decided to sort the returned messages by emailaddress. The majority of the changes in bugnotification -sending. txt are reorderings based on this; only the hunks mentioning salgado are new tests.