Edgewall Software

Changes between Version 94 and Version 95 of TracNotification


Ignore:
Timestamp:
Mar 28, 2017, 12:19:56 AM (7 years ago)
Author:
Ryan J Ollos
Comment:

Adapt example to Jinja2 requirements. Refs comment:31:ticket:12639.

Legend:

Unmodified
Added
Removed
Modified
  • TracNotification

    v94 v95  
    102102The e-mail subject can be customized with the `ticket_subject_template` option, which contains a [http://genshi.edgewall.org/wiki/Documentation/text-templates.html Genshi text template] snippet. The default value is:
    103103{{{#!genshi
    104 $prefix #$ticket.id: $summary
     104${prefix} #${ticket.id}: ${summary}
    105105}}}
    106106The following variables are available in the template:
     
    109109 * `prefix`: The prefix defined in `smtp_subject_prefix`.
    110110 * `summary`: The ticket summary, with the old value if the summary was edited.
    111  * `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, eg `$ticket.milestone`.
     111 * `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, eg `${ticket.milestone}`.
    112112
    113113=== Customizing the e-mail content
     
    116116
    117117{{{#!genshi
    118 $ticket_body_hdr
    119 $ticket_props
     118${ticket_body_hdr}
     119${ticket_props}
    120120{% choose ticket.new %}\
    121121{%   when True %}\
    122 $ticket.description
     122${ticket.description}
    123123{%   end %}\
    124124{%   otherwise %}\
     
    126126${_('Changes (by %(author)s):', author=change.author)}
    127127
    128 $changes_body
     128${changes_body}
    129129{%     end %}\
    130130{%     if changes_descr %}\
     
    132132${_('Description changed by %(author)s:', author=change.author)}
    133133{%       end %}\
    134 $changes_descr
     134${changes_descr}
    135135--
    136136{%     end %}\
     
    139139${changes_body and _('Comment:') or _('Comment (by %(author)s):', author=change.author)}
    140140
    141 $change.comment
     141${change.comment}
    142142{%     end %}\
    143143{%   end %}\
     
    146146--
    147147${_('Ticket URL: <%(link)s>', link=ticket.link)}
    148 $project.name <${project.url or abs_href()}>
    149 $project.descr
     148${project.name} <${project.url or abs_href()}>
     149${project.descr}
    150150}}}
    151151
     
    182182Replace the following second row in the template:
    183183{{{
    184 $ticket_props
     184${ticket_props}
    185185}}}
    186186