Modify

Opened 7 years ago

Closed 7 years ago

#7670 closed defect (fixed)

Allow Trac-style ticket links with latest comment anchors

Reported by: Eygene Ryabinkin Owned by: Robert Corsaro
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Standard Trac notifications have the anchor for the latest comment for the ticket and it is very handy: one just jumps from the mail message directly to the ticket modification in question.

I had created the patch,

http://codelabs.ru/patches/trac/TracAnnouncer-r8411-use-old-style-links.diff

that allows AnnouncerPlugin to generate such links; the functionality is switched on with the new knob announcer.ticket_link_with_comment, default value is False, so vanilla functionality shouldn't be affected by this commit and administrator will need to explicitely activate this feature.

It was tested on our Trac 0.12 and showed no regressions up to date.

Attachments (0)

Change History (4)

comment:1 Changed 7 years ago by Ryan J Ollos

Description: modified (diff)

Thank you for providing a patch for this. It is a feature that I've been meaning to open a ticket for.

I'm not even sure we need a trac.ini option for this. It seems like it would almost always be preferrable to have a link to the comment contained in the email, rather than just a link to the ticket.

comment:2 in reply to:  1 Changed 7 years ago by Eygene Ryabinkin

Replying to rjollos:

Thank you for providing a patch for this.

You're welcome ;))

I'm not even sure we need a trac.ini option for this. It seems like it would almost always be preferrable to have a link to the comment contained in the email, rather than just a link to the ticket.

I had added option, because the code to search for the last comment number is a bit costly: we should extract the whole changelog and count comment entries. I had not found official Trac's API for this; Trac's own notifications use rather complicated code that relies on the knowledge about database's structure, so I preferred not to copy that code.

comment:3 Changed 7 years ago by Robert Corsaro

Watch out for tabs in your python files.

comment:4 Changed 7 years ago by Robert Corsaro

Resolution: fixed
Status: newclosed

(In [8864]) Adds link to last comment in ticket

Fixes #7670 Thanks rea!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Robert Corsaro.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.