Edgewall Software

Changes between Version 95 and Version 96 of TracNotification


Ignore:
Timestamp:
Apr 3, 2017, 4:53:53 AM (7 years ago)
Author:
Ryan J Ollos
Comment:

Minor edits.

Legend:

Unmodified
Added
Removed
Modified
  • TracNotification

    v95 v96  
    55Trac supports notification of ticket changes via email.
    66
    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].
     7Email 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
     9Disabled by default, notification can be activated and configured in [TracIni trac.ini].
    1010
    1111== Receiving Notification Mails
     
    1414=== How to use your username to receive notification mails
    1515
    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.
     16To 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].
    1717
    1818Alternatively, 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.
     
    3030== Configuring SMTP Notification
    3131
    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.
    3333
    3434=== Configuration Options
     
    5959
    6060=== Subscriber Configuration
    61 The default subscriptions are configured in the `[notification-subscriber]` section in trac.ini:
     61The default subscriptions are configured in the [TracIni#notification-subscriber-section "[notification-subscriber]"] section.
    6262
    6363[[TracIni(section=notification-subscriber)]]
    6464
    65 Each user can override these defaults in his ''Notifications'' preferences.
     65Each user can override these defaults in their ''Notifications'' preferences.
    6666
    6767For 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.
     
    106106The following variables are available in the template:
    107107
    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]).
    109109 * `prefix`: The prefix defined in `smtp_subject_prefix`.
    110110 * `summary`: The ticket summary, with the old value if the summary was edited.
     
    113113=== Customizing the e-mail content
    114114
    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:
     115The 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:
    116116
    117117{{{#!genshi
    118118${ticket_body_hdr}
    119119${ticket_props}
    120 {% choose ticket.new %}\
    121 {%   when True %}\
     120# if ticket.new:
    122121${ticket.description}
    123 {%   end %}\
    124 {%   otherwise %}\
    125 {%     if changes_body %}\
     122# else:
     123#   if changes_body:
    126124${_('Changes (by %(author)s):', author=change.author)}
    127125
    128126${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:
    132130${_('Description changed by %(author)s:', author=change.author)}
    133 {%       end %}\
     131#     endif
    134132${changes_descr}
    135133--
    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)}
    140139
    141140${change.comment}
    142 {%     end %}\
    143 {%   end %}\
    144 {% end %}\
    145 
    146 --
     141#   endif
     142# endif
     143--
    147144${_('Ticket URL: <%(link)s>', link=ticket.link)}
    148145${project.name} <${project.url or abs_href()}>
     
    263260== Troubleshooting
    264261
    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 new ticket never gets notified about a notification failure. The Trac administrator needs to look at the log to find the error trace.
     262If you cannot get the notification working inspect the [TracLogging log] for error messages.
     263
     264Notification 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.
    268265
    269266=== ''Permission denied'' error