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_bugnotifications settings.
-Whereas Verbose Person does:
+Neither does Verbose Team Person - while the team wants verbose emails,
+he wants concise ones.
+
+ >>> print_notification(collated_messages['<email address hidden>'][0])
+ To: <email address hidden>
+ From: Verbose Person <email address hidden>
+ Subject: [Bug ...] subject
+ X-Launchpad-Message-Rationale: Subscriber @verboseteam
+ <BLANKLINE>
+ a really simple comment.
+ <BLANKLINE>
+ --
+ Foo is broken
+ http://bugs.launchpad.dev/bugs/...
+ You received this bug notification because you are a member of Verbose
+ Team, which is a direct subscriber.
+ <BLANKLINE>
+ ----------------------------------------------------------------------
+
+Whereas Verbose Person does get the description and task status:
-And Team Person does too, even though his team doesn't want them:
+And Concise Team Person does too, even though his team doesn't want them:
- >>> print_notification(collated_messages['<email address hidden>'][0])
- To: <email address hidden>
+ >>> print_notification(collated_messages['<email address hidden>'][0])
+ To: <email address hidden>
From: Verbose Person <email address hidden>
Subject: [Bug ...] subject
- X-Launchpad-Message-Rationale: Subscriber @bugteam
+ X-Launchpad-Message-Rationale: Subscriber @conciseteam
<BLANKLINE>
a really simple comment.
<BLANKLINE>
--
Foo is broken http://bugs.launchpad.dev/bugs/...
- You received this bug notification because you are a member of Bug Team,
- which is a direct subscriber.
+ You received this bug notification because you are a member of Concise
+ Team, which is a direct subscriber.
<BLANKLINE>
Status in Foo: New
<BLANKLINE>
I've added the other case and renamed the variables.
=== modified file 'lib/lp/ bugs/doc/ bugnotification -sending. txt' bugs/doc/ bugnotification -sending. txt 2009-07-23 14:49:07 +0000 bugs/doc/ bugnotification -sending. txt 2009-07-23 15:40:14 +0000
--- lib/lp/
+++ lib/lp/
@@ -1249,32 +1249,53 @@
To demonstrate verbose notifications, we'll create a bug, and subscribe bugnotification s settings.
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_ db_to_launchpad () makeBug( product= factory. makeProduct( title=' Foo'), makePerson( displayname= 'Verbose Person', verbose_ bugnotification s = True vperson, vperson) n...> makePerson( displayname= 'Concise Person', verbose_ bugnotification s = False cperson, cperson) n...> makeTeam( name='bugteam' , displayname='Bug Team') bugnotification s = False makePerson( displayname= 'Team Person', verbose_ bugnotification s = True tperson, tperson) factory. makeProduct( title=' Foo'), title='Foo is broken', 'Verbose Person', <email address hidden>') person. verbose_ bugnotification s = True verbose_ person, verbose_person) n...> 'Concise Person', <email address hidden>') person. verbose_ bugnotification s = False concise_ person, concise_person) n...> 'Concise Team') team.verbose_ bugnotification s = False 'Concise Team Person', team_person. verbose_ bugnotification s = True team.addMember( concise_ team_person, concise_ team_person) concise_ team, concise_ team_person) n...> 'Verbose Team') team.verbose_ bugnotification s = True 'Verbose Team Person', team_person. verbose_ bugnotification s = False team.addMember( verbose_ team_person, verbose_ team_person) verbose_ team, verbose_ team_person) iption. ..>
- >>> 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=
+ >>> verbose_
+ >>> verbose_team_person = factory.makePerson(
+ ... displayname=
+ ... <email address hidden>')
+ >>> verbose_
+ >>> verbose_
+ >>> bug.subscribe(
<BugSubscr
We'll expire all existing notifications since we're not interested in
@@ -1296,7 +1317,7 @@
notifications containing that comment.
>>> comment = getUtility( IMessageSet) .fromText( ten_minutes_ ago) otification( comment)
- ... 'subject', 'a really simple comment.', vperson,
+ ... 'subject', 'a really simple comment.', verbose_person,
... datecreated=
>>> bug.addCommentN
@@ -1345,7 +1366,26 @@ ------- ------- ------- ------- ------- ------- ------- ------- ------- -----
<BLANKLINE>
--
-Whereas Verbose Person does: ion(collated_ messages[ '<email address hidden>'][0]) Message- Rationale: Subscriber @verboseteam bugs.launchpad. dev/bugs/... ------- ------- ------- ------- ------- ------- ------- ------- -------
+Neither does Verbose Team Person - while the team wants verbose emails,
+he wants concise ones.
+
+ >>> print_notificat
+ To: <email address hidden>
+ From: Verbose Person <email address hidden>
+ Subject: [Bug ...] subject
+ X-Launchpad-
+ <BLANKLINE>
+ a really simple comment.
+ <BLANKLINE>
+ --
+ Foo is broken
+ http://
+ You received this bug notification because you are a member of Verbose
+ Team, which is a direct subscriber.
+ <BLANKLINE>
+ -------
+
+Whereas Verbose Person does get the description and task status:
>>> print_notificat ion(collated_ messages[ '<email address hidden>'][0]) ------- ------- ------- ------- ------- ------- ------- ------- ------- -----
To: <email address hidden>
@@ -1368,21 +1408,21 @@
<BLANKLINE>
--
-And Team Person does too, even though his team doesn't want them:
+And Concise Team Person does too, even though his team doesn't want them:
- >>> print_notificat ion(collated_ messages[ '<email address hidden>'][0]) ion(collated_ messages[ '<email address hidden>'][0]) Message- Rationale: Subscriber @bugteam Message- Rationale: Subscriber @conciseteam bugs.launchpad. dev/bugs/...
- To: <email address hidden>
+ >>> print_notificat
+ To: <email address hidden>
From: Verbose Person <email address hidden>
Subject: [Bug ...] subject
- X-Launchpad-
+ X-Launchpad-
<BLANKLINE>
a really simple comment.
<BLANKLINE>
--
Foo is broken
http://
- You received this bug notification because you are a member of Bug Team,
- which is a direct subscriber.
+ You received this bug notification because you are a member of Concise
+ Team, which is a direct subscriber.
<BLANKLINE>
Status in Foo: New
<BLANKLINE>