Edgewall Software

Ticket #2247: notify_own_changes-0.11.7.patch

File notify_own_changes-0.11.7.patch, 1.4 KB (added by stef@…, 20 months ago)

Sebastian's patch for 0.11.7

  • ./trac/ticket/notification.py

    old new  
    4343        property change and to any previous updater of that ticket.""") 
    4444         
     45    notify_own_changes = BoolOption('notification', 'notify_own_changes', 
     46                                    'false', 
     47        """Send notifications even if it was triggered by the user itself. If  
     48        this option is "false" all recipients will only be notified about  
     49        changes made by other users.""") 
     50          
    4551    ticket_subject_template = Option('notification', 'ticket_subject_template',  
    4652                                     '$prefix #$ticket.id: $summary', 
     
    239245        notify_updater = self.config.getbool('notification',  
    240246                                             'always_notify_updater') 
     247        notify_own_changes = self.config.getbool('notification',  
     248                                                 'notify_own_changes') 
    241249 
    242250        ccrecipients = self.prev_cc 
     
    286294        elif updater: 
    287295            torecipients.append(updater) 
     296             
     297        if not notify_own_changes and updater: 
     298            torecipients = [r for r in torecipients if r != updater] 
     299            ccrecipients = [r for r in ccrecipients if r != updater] 
    288300 
    289301        return (torecipients, ccrecipients)