Edgewall Software

Changes between Version 47 and Version 48 of TracNotification


Ignore:
Timestamp:
Oct 8, 2009, 5:13:57 PM (15 years ago)
Author:
Chris.Nelson@…
Comment:

Began details about e-mail content customization

Legend:

Unmodified
Added
Removed
Modified
  • TracNotification

    v47 v48  
    11= Email Notification of Ticket Changes =
    22[[TracGuideToc]]
     3
     4[[PageOutline]]
    35
    46Trac supports notification about ticket changes via email.
     
    7072 * `ticket`: The ticket model object (see [trac:source:/trunk/trac/ticket/model.py model.py]). Individual ticket fields can be addressed by appending the field name separated by a dot, e.g. `$ticket.milestone`.
    7173
     74=== Customizing the e-mail content ===
     75
     76The notification e-mail content is generated based on `ticket_notify_email.txt` in `trac/ticket/templates`.  The default looks like this:
     77
     78{{{
     79$ticket_body_hdr
     80$ticket_props
     81#choose ticket.new
     82  #when True
     83$ticket.description
     84  #end
     85  #otherwise
     86    #if changes_body
     87Changes (by $change.author):
     88
     89$changes_body
     90    #end
     91    #if changes_descr
     92      #if not changes_body and not change.comment and change.author
     93Description changed by $change.author:
     94      #end
     95$changes_descr
     96--
     97    #end
     98    #if change.comment
     99
     100Comment${not changes_body and '(by %s)' % change.author or ''}:
     101
     102$change.comment
     103    #end
     104  #end
     105#end
     106
     107--
     108Ticket URL: <$ticket.link>
     109$project.name <${project.url or abs_href()}>
     110$project.descr
     111}}}
    72112== Sample Email ==
    73113{{{