Edgewall Software

Opened 6 years ago

Last modified 2 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
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@…> 6 years ago.

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by juliak <kavalerchik@…>

comment:1 Changed 6 years ago by anonymous

Milestone: next-minor-0.12.x0.13

comment:2 Changed 6 years ago by Christian Boos

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 Changed 6 years ago by Remy Blank

Milestone: 1.01.0-triage

Preparing for 1.0.

comment:4 Changed 6 years ago by Christian Boos

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

Moving enhancements to dev.

comment:5 Changed 2 years ago by figaro

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.