Opened 14 years ago
Last modified 10 years ago
#10396 new enhancement
[PATCH] New extension point interface to reformat the "replying to" block in a comment
| Reported by: | 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: | |||
| Internal Changes: | |||
Description
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)
Change History (6)
by , 14 years ago
| Attachment: | ticket.commentformatter.diff added |
|---|
comment:1 by , 14 years ago
| Milestone: | next-minor-0.12.x → 0.13 |
|---|
comment:2 by , 14 years ago
comment:4 by , 13 years ago
| Milestone: | next-stable-1.0.x → next-major-releases |
|---|
Moving enhancements to dev.
comment:5 by , 10 years ago
| Keywords: | patch added |
|---|



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.