Edgewall Software

Changes between Initial Version and Version 16 of Ticket #3517


Ignore:
Timestamp:
Dec 6, 2014, 12:11:06 PM (8 years ago)
Author:
Peter Suter
Comment:

Committed to trunk in [13454]. I'll follow up with changes for milestone delete and retargeting events:

  • trac/ticket/roadmap.py

    diff -r c5cadf7e6beb trac/ticket/roadmap.py
    a b  
    3535from trac.util.text import CRLF, exception_to_unicode, to_unicode
    3636from trac.util.translation import _, tag_
    3737from trac.ticket.api import TicketSystem
    38 from trac.ticket.notification import BatchTicketNotifyEmail
     38from trac.ticket.notification import send_ticket_event, BatchTicketChangeEvent
    3939from trac.ticket.model import Milestone, MilestoneCache, Ticket, \
    4040                              group_milestones
    4141from trac.timeline.api import ITimelineEventProvider
     
    775775                new_values = {'milestone': retarget_to}
    776776                comment = comment or \
    777777                          _("Open tickets retargeted after milestone closed")
    778                 tn = BatchTicketNotifyEmail(self.env)
     778                event = BatchTicketChangeEvent(retargeted_tickets, None,
     779                                               req.authname, comment,
     780                                               new_values, None)
    779781                try:
    780                     tn.notify(retargeted_tickets, new_values, comment, None,
    781                               req.authname)
     782                    send_ticket_event(self.env, self.config, event)
    782783                except Exception as e:
    783784                    self.log.error("Failure sending notification on ticket "
    784785                                   "batch change: %s",
     
    827828                              retarget=retarget_to))
    828829            new_values = {'milestone': retarget_to}
    829830            comment = _("Tickets retargeted after milestone deleted")
    830             tn = BatchTicketNotifyEmail(self.env)
     831            event = BatchTicketChangeEvent(retargeted_tickets, None,
     832                                           req.authname, comment, new_values,
     833                                           None)
    831834            try:
    832                 tn.notify(retargeted_tickets, new_values, comment, None,
    833                           req.authname)
     835                send_ticket_event(self.env, self.config, event)
    834836            except Exception as e:
    835837                self.log.error("Failure sending notification on ticket batch "
    836838                               "change: %s", exception_to_unicode(e))

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3517

    • Property Status newassigned
    • Property Severity normalmajor
    • Property Cc ufs@… davidf@… pacopablo@… Jun Omae added
    • Property Component ticket systemnotification
    • Property Milestone1.1.3
    • Property Owner changed from Jonas Borgström to Peter Suter
  • Ticket #3517 – Release Notes

    initial v16  
     1Allow plugins to extend notification system.
  • Ticket #3517 – API Changes

    initial v16  
     1Added new API for notification distribution and extension points:
     2* [wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.INotificationDistributor INotificationDistributor]: For different notification distribution channels
     3* [wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.INotificationFormatter INotificationFormatter]: For customized notification message formatting
     4* [wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.IEmailAddressResolver IEmailAddressResolver]: For finding email addresses
     5* [wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.IEmailDecorator IEmailDecorator]: For adding email headers independently from message formatting