Edgewall Software

Ticket #2247: notify_own_changes.013dev-r10668.patch

File notify_own_changes.013dev-r10668.patch, 1.7 KB (added by gt4329b, 14 months ago)

version of the patch for 0.13dev-r10668

  • notification.py

     
    4848                                       'true', 
    4949        """Always send notifications to the person who causes the ticket  
    5050        property change and to any previous updater of that ticket.""") 
     51 
     52    notify_own_changes = BoolOption('notification', 'notify_own_changes', 
     53                                    'false', 
     54        """Send notifications even if it was triggered by the user itself. If  
     55        this option is "false" (the default) all recipients will only be notified about  
     56        changes made by other users.""")       
    5157         
    5258    ticket_subject_template = Option('notification', 'ticket_subject_template',  
    5359                                     '$prefix #$ticket.id: $summary', 
     
    328334                                           'always_notify_owner') 
    329335        notify_updater = self.config.getbool('notification',  
    330336                                             'always_notify_updater') 
     337        notify_own_changes = self.config.getbool('notification',  
     338                                                 'notify_own_changes') 
    331339 
    332340        ccrecipients = self.prev_cc 
    333341        torecipients = [] 
     
    377385            elif updater: 
    378386                torecipients.append(updater) 
    379387 
     388            if not notify_own_changes and updater: 
     389                torecipients = [r for r in torecipients if r != updater] 
     390                ccrecipients = [r for r in ccrecipients if r != updater] 
     391 
    380392        return (torecipients, ccrecipients) 
    381393 
    382394    def get_message_id(self, rcpt, modtime=None):