Add an ITicketCommentProvider interface
|Reported by:||Ryan J Ollos||Owned by:|
Description (last modified by )
The design of the CommitTicketUpdater makes it difficult to retroactively add changeset comments (#11478). CommitTicketUpdater comments added retroactively are not likely to be in the correct chronological order. It would be difficult to remove CommitTicketUpdater comments if it's later decided to use a plugin such as TracTicketChangelogPlugin instead of having the changeset comments inline in the ticket changelog. The repository links are no longer correct if the repository name is changed (although this is generally true for TracLinks to the repository).
I've also used the Jenkins Trac Publisher Plugin which has similar issues.
I've considered another approach.
- Add an
ITicketCommentProviderinterface, that returns a comment along with a timestamp and possibly some other metadata. The ticket changelog would be created from data provided by
- One of the
ITicketCommentProvidermethods could be
get_comment_filter, so that it would be possible to have a filter such as Show changesets or Show build results.
- The full history of a
ITicketCommentProvidersource would be available upon activating the plugin, and the comments would have the correct chronological ordering.
- CommitTicketUpdater would create a table associating tickets with changeset. As an aside, the table would also be useful for th:#12621.
- CommitTicketUpdater would provide comments through an implementation of
One difficult aspect might be, on activating the plugin it might be desired to remove all previous instances of comments containing
CommitTicketReferenceMacro instances. This could be done in an upgrade script, or through a script provided in