Opened 8 years ago
Last modified 8 years ago
#11887 new enhancement
List Ticket Attachments in TracNotification
|Reported by:||anonymous||Owned by:|
Description (last modified by )
I'd like to list the filenames and possibly URLs of a ticket's attachments in each notification email. I need to gain access to ticket attachments in the
trac_notify_email.txt. I've been working on it for the past couple of days and am not sure if this is possible. Please excuse my limited experience working with Trac and Genshi.
Is this something that can be done currently? If not maybe it's worth adding as a feature? Thanks
Change History (5)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
comment:3 by , 8 years ago
Thanks for your response, I'm surprised nobody has requested this yet. Would it be possible to attach a ticket's attachment data to the available variables within the
trac_notify_email.txt template? Seems like it could be done using the trac.attachment module.
comment:4 by , 8 years ago
I think it should be possible to make that available, yes. And you are correct that the
trac.attachment module would be used. (For example in  it's used to show the list of attachments when deleting a wiki page.)
(#10438 was another discussion about available variables in notification templates.)
comment:5 by , 8 years ago
I don't think it's possible to access the information you want from
trac_notify_email.txtcurrently. The available variables there don't seem to contain that data.
In Trac 1.1.3 it might be possible to write a INotificationFormatter that does what you want.