11
11
from zope.interface import implements
13
from lp.services.mail.interfaces import INotificationRecipientSet
13
from canonical.launchpad.interfaces.launchpad import INotificationRecipientSet
14
14
from lp.services.mail.notificationrecipientset import NotificationRecipientSet
75
75
def addDupeSubscriber(self, person, duplicate_bug=None):
76
76
"""Registers a subscriber of a duplicate of this bug."""
77
77
reason = "Subscriber of Duplicate"
79
79
text = ("are a member of %s, which is subscribed "
80
80
"to a duplicate bug report" % person.displayname)
81
81
reason += " @%s" % person.name
88
88
def addDirectSubscriber(self, person):
89
89
"""Registers a direct subscriber of this bug."""
90
90
reason = "Subscriber"
92
92
text = ("are a member of %s, which is subscribed "
93
93
"to the bug report" % person.displayname)
94
94
reason += " @%s" % person.name
99
99
def addAssignee(self, person):
100
100
"""Registers an assignee of a bugtask of this bug."""
101
101
reason = "Assignee"
103
103
text = ("are a member of %s, which is a bug assignee"
104
104
% person.displayname)
105
105
reason += " @%s" % person.name
107
107
text = "are a bug assignee"
108
108
self._addReason(person, text, reason)
110
def addBugSupervisor(self, person):
111
"""Registers a bug supervisor of a bugtask's pillar of this bug."""
112
reason = "Bug Supervisor"
114
text = ("are a member of %s, which is a bug supervisor"
115
% person.displayname)
116
reason += " @%s" % person.name
118
text = "are a bug supervisor"
119
self._addReason(person, text, reason)
121
def addSecurityContact(self, person):
122
"""Registers a security contact of a bugtask's pillar of this bug."""
123
reason = "Security Contact"
125
text = ("are a member of %s, which is a security contact"
126
% person.displayname)
127
reason += " @%s" % person.name
129
text = "are a security contact"
130
self._addReason(person, text, reason)
132
def addMaintainer(self, person):
133
"""Registers a maintainer of a bugtask's pillar of this bug."""
134
reason = "Maintainer"
136
text = ("are a member of %s, which is a maintainer"
137
% person.displayname)
138
reason += " @%s" % person.name
140
text = "are a maintainer"
141
self._addReason(person, text, reason)
143
110
def addStructuralSubscriber(self, person, target):
144
111
"""Registers a structural subscriber to this bug's target."""
145
112
reason = "Subscriber (%s)" % target.displayname
147
114
text = ("are a member of %s, which is subscribed to %s" %
148
115
(person.displayname, target.displayname))
149
116
reason += " @%s" % person.name
154
121
def addRegistrant(self, person, upstream):
155
122
"""Registers an upstream product registrant for this bug."""
156
123
reason = "Registrant (%s)" % upstream.displayname
158
125
text = ("are a member of %s, which is the registrant for %s" %
159
126
(person.displayname, upstream.displayname))
160
127
reason += " @%s" % person.name