Modify ↓
#4202 closed enhancement (fixed)
attachment link and text to html
Reported by: | georgesoon | Owned by: | Robert Corsaro |
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
features:
- add link to attachment in mail
- try covert some wiki format text to html
- unfortunately I do not know how to cope with trac links
- because there is no req used in announcer, so I can not set context with wiki_to_html
changeset
- ticket_email.py
- ticket_email_mimic.html (attachment link)
reference changes in ticket_email.py
try: temp = wiki_to_html(event.comment, self.env, None) except: temp = 'Comment in plain text: %s ' %(event.comment) data = dict( ticket = ticket, author = event.author, header = self.ticket_email_header_fields, comment = temp, category = event.category, ticket_link = self.env.abs_href('ticket', ticket.id), project_name = self.env.project_name, project_desc = self.env.project_description, project_link = self.env.project_url or self.env.abs_href(), has_changes = short_changes or long_changes, long_changes = long_changes, short_changes = short_changes, attachment= event.attachment, attachment_link = self.env.abs_href('attachment/ticket',ticket.id) )
Attachments (2)
Change History (8)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
- I made this modification on an older version of the announcer
- and I tried the description could be formatted to html style from plain text as well by
try: ticket['description'] = wiki_to_html(ticket['description'], self.env, None)
Just for your reference
Changed 16 years ago by
Attachment: | my-patch-for-email_mimic.diff added |
---|
svn diff for ticket_email_mimic.html
comment:3 Changed 15 years ago by
Status: | new → assigned |
---|
How'd I miss this? I'll try and give it a whirl tonight.
comment:4 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 15 years ago by
comment:6 Changed 15 years ago by
My ticket descriptions are being formatted in plain text. I see the message "Comment in plain text: None" at the end, which I believe means I am falling to the exception case added in [7574], but I'm unsure why. I turned on debugging, but I see nothing of significance in the log. Everything looks good in it.
Which version of Trac has this been tested against? I am using Trac 0.11.7rc1.
Note: See
TracTickets for help on using
tickets.
Can you upload a unified diff? I don't know what this is supposed to mean.