Edgewall Software

Opened 8 years ago

Last modified 6 years ago

#12485 new enhancement

Add an ITicketCommentProvider interface — at Initial Version

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: next-major-releases
Component: ticket system Version:
Severity: normal Keywords: CommitTicketUpdater
Cc: leho@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

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.

I've also used the Jenkins Trac Publisher Plugin which has similar issues.

I've considered another approach.

  • Add an ITicketCommentProvider interface, that returns a comment along with a timestamp and possibly some other metadata. The ticket changelog would be created from data provided by ITicketCommentProvider implementations.
  • One of the ITicketCommentProvider methods 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 ITicketCommentProvider source 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 ITicketCommentProvider.

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 contrib.

Change History (0)

Note: See TracTickets for help on using tickets.