Modify

Opened 4 years ago

Closed 4 years ago

#7670 closed defect (fixed)

Allow Trac-style ticket links with latest comment anchors

Reported by: rea Owned by: doki_pen
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by rjollos)

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 follow-up: Changed 4 years ago by rjollos

  • 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 4 years ago by rea

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 4 years ago by doki_pen

Watch out for tabs in your python files.

comment:4 Changed 4 years ago by doki_pen

  • Resolution set to fixed
  • Status changed from new to closed

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

Fixes #7670
Thanks rea!

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from doki_pen. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.