~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/doc/bugnotification-email.txt

  • Committer: Stuart Bishop
  • Date: 2011-09-28 12:49:24 UTC
  • mfrom: (9893.10.1 trivial)
  • mto: This revision was merged to the branch mainline in revision 14178.
  • Revision ID: stuart.bishop@canonical.com-20110928124924-m5a22fymqghw6c5i
Merged trivial into distinct-db-users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
 
94
94
New security related bugs are sent with a prominent warning:
95
95
 
96
 
    >>> changed = bug_four.setSecurityRelated(True)
 
96
    >>> changed = bug_four.setSecurityRelated(
 
97
    ...     True, getUtility(ILaunchBag).user)
97
98
 
98
99
    >>> subject, body = generate_bug_add_email(bug_four)
99
100
    >>> subject
214
215
    + It's also smart enough to preserve whitespace, finally!
215
216
    -----------------------------
216
217
 
 
218
(Note that there's a blank line in the email that contains whitespace.  You
 
219
may see a lint warning for that.)
 
220
 
217
221
Let's make the bug security-related, and private (we need to switch
218
222
logins to a user that is explicitly subscribed to this bug):
219
223
 
221
225
 
222
226
    >>> edited_bug.setPrivate(True, getUtility(ILaunchBag).user)
223
227
    True
224
 
 
225
 
    >>> changed = edited_bug.setSecurityRelated(True)
 
228
    >>> changed = edited_bug.setSecurityRelated(
 
229
    ...     True, getUtility(ILaunchBag).user)
226
230
    >>> bug_delta = BugDelta(
227
231
    ...     bug=edited_bug,
228
232
    ...     bugurl="http://www.example.com/bugs/2",
248
252
 
249
253
    >>> edited_bug.setPrivate(False, getUtility(ILaunchBag).user)
250
254
    True
251
 
 
252
 
    >>> changed = edited_bug.setSecurityRelated(False)
 
255
    >>> changed = edited_bug.setSecurityRelated(
 
256
    ...     False, getUtility(ILaunchBag).user)
253
257
    >>> bug_delta = BugDelta(
254
258
    ...     bug=edited_bug,
255
259
    ...     bugurl="http://www.example.com/bugs/2",