~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/mail/bugnotificationrecipients.py

[r=stevenk][bug=52915] Notify new project maintainer when a private
        bugtask is re-targetted to the project.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
            text = "are a security contact"
130
130
        self._addReason(person, text, reason)
131
131
 
 
132
    def addMaintainer(self, person):
 
133
        """Registers a maintainer of a bugtask's pillar of this bug."""
 
134
        reason = "Maintainer"
 
135
        if person.isTeam():
 
136
            text = ("are a member of %s, which is a maintainer"
 
137
                    % person.displayname)
 
138
            reason += " @%s" % person.name
 
139
        else:
 
140
            text = "are a maintainer"
 
141
        self._addReason(person, text, reason)
 
142
 
132
143
    def addStructuralSubscriber(self, person, target):
133
144
        """Registers a structural subscriber to this bug's target."""
134
145
        reason = "Subscriber (%s)" % target.displayname