Edgewall Software

Opened 7 years ago

Last modified 3 years ago

#10396 new enhancement

[PATCH] New extension point interface to reformat the "replying to" block in a comment

Reported by: juliak <kavalerchik@…> Owned by:
Priority: normal Milestone: next-major-releases
Component: ticket system Version: 0.12-stable
Severity: normal Keywords: patch ticket comment
Cc: Branch:
Release Notes:
API Changes:


Sometimes you don't want the original text in a response on a ticket in the "Replying to" line. Instead some sort of custom formatting (e.g. abbreviation, reference no.) could be used preferably.

Solution: A new extension point ITicketCommentFormatter defined in ticket/api.py.

The function quote_original() in ticket/web_ui.py calls the plugins, that implement the new extension point. So it is possible to reformat the "replying to" block in a comment, to leave it unchanged or to drop it at all.

Attachments (1)

ticket.commentformatter.diff (2.7 KB ) - added by juliak <kavalerchik@…> 7 years ago.

Download all attachments as: .zip

Change History (6)

by juliak <kavalerchik@…>, 7 years ago

comment:1 by anonymous, 7 years ago

Milestone: next-minor-0.12.x0.13

comment:2 by Christian Boos, 7 years ago

About the patch: you have a typical use case for Python's idiomatic for ...: / break / else: /... statement.

But that's a detail. The more important question this ticket raises is whether the TracDev/ComponentArchitecture is really adapted to such level of fine-grained customization…

I'd be more leaning toward refactoring this replyto formatting into a method, that you could then monkey patch.

comment:3 by Remy Blank, 7 years ago

Milestone: 1.01.0-triage

Preparing for 1.0.

comment:4 by Christian Boos, 7 years ago

Milestone: next-stable-1.0.xnext-major-releases

Moving enhancements to dev.

comment:5 by figaro, 3 years ago

Keywords: patch added

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set.
The owner will be changed from (none) to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.