I'm using Trac 1.0.1 with a slightly modified notification.py to allow HTML
in ticket notifications. This part works great, but I'm not clear on how
to add additional ticket properties to notifications.
This snippet on the TracNotification page is taken from
ticket_notify_email.txt
--------------------------------------------------------------------------
> {% with
> pv = [(a[0].strip(), a[1].strip()) for a in [b.split(':') for b in
> [c.strip() for c in
> ticket_props.replace('|', '\n').splitlines()[1:-1]] if ':' in
> b]];
> sel = ['Reporter', 'Owner', 'Type', 'Status', 'Priority', 'Milestone',
> 'Component', 'Severity', 'Resolution', 'Keywords'] %}\
> ${'\n'.join('%s\t%s' % (format(p[0]+':', ' <12'), p[1]) for p in pv if
> p[0] in sel)}
> {% end %}\
> --------------------------------------------------------------------------
This creates a "table" of ticket properties in notifications, but I'm not
seeing how to set additional variables. I tried adding "Time" to the sel
array, but no dice. I'd like to get the ticket Create Date listed in the
ticket data (along with Reporter, Owner, Type, ect).
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.