Changes between Version 95 and Version 96 of TracNotification
- Timestamp:
- Apr 3, 2017, 4:53:53 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracNotification
v95 v96 5 5 Trac supports notification of ticket changes via email. 6 6 7 Email notification is useful to keep users up-to-date on tickets /issues of interest, and also provides a convenient way to post all ticket changes to a dedicated mailing list. For example, this is how the [http://lists.edgewall.com/archive/trac-tickets/ Trac-tickets] mailing list is set up.8 9 Disabled by default, notification can be activated and configured in [ wiki:TracIni trac.ini].7 Email notification is useful to keep users up-to-date on tickets of interest, and also provides a convenient way to post all ticket changes to a dedicated mailing list. 8 9 Disabled by default, notification can be activated and configured in [TracIni trac.ini]. 10 10 11 11 == Receiving Notification Mails … … 14 14 === How to use your username to receive notification mails 15 15 16 To receive notification mails, you can either enter a full email address or your Trac username. To get notified with a simple username or login, you need to specify a valid email address in the ''Preferences'' page.16 To receive notification mails, you can either enter a full email address or your Trac username. To get notified with a simple username or login, you need to specify a valid email address in your [/prefs preferences]. 17 17 18 18 Alternatively, a default domain name ('''`smtp_default_domain`''') can be set in the TracIni file, see [#ConfigurationOptions Configuration Options] below. In this case, the default domain will be appended to the username, which can be useful for an "Intranet" kind of installation. … … 30 30 == Configuring SMTP Notification 31 31 32 '''Important:''' For TracNotification to work correctly, the `[trac] base_url` option must be set in [wiki:TracIni trac.ini].32 '''Important:''' For TracNotification to work correctly, the [[TracIni#trac-base_url-option|[trac] base_url]] option must be configured. 33 33 34 34 === Configuration Options … … 59 59 60 60 === Subscriber Configuration 61 The default subscriptions are configured in the `[notification-subscriber]` section in trac.ini:61 The default subscriptions are configured in the [TracIni#notification-subscriber-section "[notification-subscriber]"] section. 62 62 63 63 [[TracIni(section=notification-subscriber)]] 64 64 65 Each user can override these defaults in his''Notifications'' preferences.65 Each user can override these defaults in their ''Notifications'' preferences. 66 66 67 67 For example to unsubscribe from notifications for one's own changes and comments, the rule "Never notify: I update a ticket" should be added above other subscription rules. … … 106 106 The following variables are available in the template: 107 107 108 * `env`: The project environment (see [trac:source:/trunk/trac/env.py env.py]).108 * `env`: The project environment object (see [trac:source:/trunk/trac/env.py env.py]). 109 109 * `prefix`: The prefix defined in `smtp_subject_prefix`. 110 110 * `summary`: The ticket summary, with the old value if the summary was edited. … … 113 113 === Customizing the e-mail content 114 114 115 The notification e-mail content is generated based on `ticket_notify_email.txt` in `trac/ticket/templates`. You can add your own version of this template by adding a `ticket_notify_email.txt` to the templates directory of your environment. The default looks like this:115 The notification e-mail content is generated based on `ticket_notify_email.txt` in `trac/ticket/templates`. You can add your own version of this template by adding a `ticket_notify_email.txt` to the templates directory of your environment. The default is: 116 116 117 117 {{{#!genshi 118 118 ${ticket_body_hdr} 119 119 ${ticket_props} 120 {% choose ticket.new %}\ 121 {% when True %}\ 120 # if ticket.new: 122 121 ${ticket.description} 123 {% end %}\ 124 {% otherwise %}\ 125 {% if changes_body %}\ 122 # else: 123 # if changes_body: 126 124 ${_('Changes (by %(author)s):', author=change.author)} 127 125 128 126 ${changes_body} 129 {% end %}\ 130 {% if changes_descr %}\ 131 {% if not changes_body and not change.comment and change.author %}\ 127 # endif 128 # if changes_descr: 129 # if not changes_body and not change.comment and change.author: 132 130 ${_('Description changed by %(author)s:', author=change.author)} 133 {% end %}\ 131 # endif 134 132 ${changes_descr} 135 133 -- 136 {% end %}\ 137 {% if change.comment %}\ 138 139 ${changes_body and _('Comment:') or _('Comment (by %(author)s):', author=change.author)} 134 # endif 135 # if change.comment: 136 137 ${_('Comment:') if changes_body else 138 _('Comment (by %(author)s):', author=change.author)} 140 139 141 140 ${change.comment} 142 {% end %}\ 143 {% end %}\ 144 {% end %}\ 145 146 -- 141 # endif 142 # endif 143 -- 147 144 ${_('Ticket URL: <%(link)s>', link=ticket.link)} 148 145 ${project.name} <${project.url or abs_href()}> … … 263 260 == Troubleshooting 264 261 265 If you cannot get the notification working , first make sure the log is activated and have a look at the log to find if an error message has been logged. See TracLogging for help about the log feature.266 267 Notification errors are not reported through the web interface, so the user who submits a change or a newticket never gets notified about a notification failure. The Trac administrator needs to look at the log to find the error trace.262 If you cannot get the notification working inspect the [TracLogging log] for error messages. 263 264 Notification errors are not reported through the web interface, so the user who submits a change or creates a ticket never gets notified about a notification failure. The Trac administrator needs to look at the log to find the error trace. 268 265 269 266 === ''Permission denied'' error