~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/adapters/bugchange.py

Merged db-devel into replication.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    'BugTaskAdded',
28
28
    'BugTaskAssigneeChange',
29
29
    'BugTaskBugWatchChange',
 
30
    'BugTaskDeleted',
30
31
    'BugTaskImportanceChange',
31
32
    'BugTaskMilestoneChange',
32
33
    'BugTaskStatusChange',
260
261
            }
261
262
 
262
263
 
 
264
class BugTaskDeleted(BugChangeBase):
 
265
    """A bugtask was removed from the bug."""
 
266
 
 
267
    def __init__(self, when, person, bugtask):
 
268
        super(BugTaskDeleted, self).__init__(when, person)
 
269
        self.targetname = bugtask.bugtargetname
 
270
 
 
271
    def getBugActivity(self):
 
272
        """See `IBugChange`."""
 
273
        return dict(
 
274
            whatchanged='bug task deleted',
 
275
            oldvalue=self.targetname)
 
276
 
 
277
    def getBugNotification(self):
 
278
        """See `IBugChange`."""
 
279
        return {
 
280
            'text': (
 
281
                "** No longer affects: %s" % self.targetname),
 
282
            }
 
283
 
 
284
 
263
285
class SeriesNominated(BugChangeBase):
264
286
    """A user nominated the bug to be fixed in a series."""
265
287