Marc-Antoine Zizka wrote:
> Is there an easy way to modify the notification Subject line to include
> a ticket field?  We have a custom field, "State".  We'd like the
> notification Subject to include the State field and follow this syntax
> as much as possible:
>
> [Type] [Ticket] [State]:  [Summary]
>
> Example:
>
> CR #4 Assigned:  Change background color from black to chartreuse.
>
>
> Can this easily be done?  I'm looking at notification.py and it isn't
> clear to me (as a non-programmer) how to do this.  I would appreciate
> any guidance and details.

There is no "easy" way. You'll have to change the 'format_subj' method in
notification.py.

You would want something like this:

return '%s #%s %s: %s' % (self.ticket['type'], self.ticket.id,
                          self.ticket['status'], self.ticket['summary'])

If you have the smtp_subject_prefix set to something or simply not part of
your configuration (so the project name is added to each email), then you'll
want to change the other return value in a similar way, only adding the
prefix first.

Thank you for your reply.

I searched for "format_subj" in notification.py, and it doesn't exist
anywhere.  Did you mean "format_header"?  If so, I'm not clear (not
even close) on where to insert the above.

Jen


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to