On Trac-1.4 I followed
https://trac.edgewall.org/wiki/CookBook/Notification/Templates#jinja2

and have a $PROJECT_ENV/templates/ticket_notify_email.txt like this:

${ticket_body_hdr}
# set sel = ('Reporter', 'Owner', 'Type', 'Status', 'Priority', 'Milestone',
             'Component', 'Severity', 'Resolution', 'Keywords')
# for a in ticket_props.replace('|', '\n').splitlines()[1:-1]|map('trim'):
#   set a = a.split(':', 1)|map('trim')|list
#   if len(a) > 1 and a[0] in sel:
${'%-*s  %s'|format(12, a[0] + ':', a[1])}
#   endif
# endfor
# if ticket.new:
${ticket.description}
# else:
#   if changes_body:
${_('Changes (by %(author)s):', author=change.author)}

${changes_body}
#   endif
#   if changes_descr:
#     if not changes_body and not change.comment and change.author:
${_('Description changed by %(author)s:', author=change.author)}
#     endif
${changes_descr}
--
#   endif
#   if change.comment:

${_('Comment:') if changes_body else
  _('Comment (by %(author)s):', author=change.author)}

${change.comment}
#   endif
# endif
${'-- '}
${_('Ticket URL: <%(link)s>', link=ticket.link)}
${project.name} <${project.url or abs_href()}>
${project.descr}

which is almost the default template with *${ticket_props}* replaced by

# set sel = ('Reporter', 'Owner', 'Type', 'Status', 'Priority', 'Milestone',
             'Component', 'Severity', 'Resolution', 'Keywords')
# for a in ticket_props.replace('|', '\n').splitlines()[1:-1]|map('trim'):
#   set a = a.split(':', 1)|map('trim')|list
#   if len(a) > 1 and a[0] in sel:
${'%-*s  %s'|format(12, a[0] + ':', a[1])}
#   endif
# endfor

But is has no effect. Is the file and location correct? I also deployed by 
trac-admin, not sure if required.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/ac0deaeb-7474-473a-9dda-c4acb9df79e3%40googlegroups.com.

Reply via email to