Am 27.04.2010 09:31, schrieb Josh Godsiff:
My company is looking to extend Trac in order to allow us to specify
certain comments as being public or private (depending on whether we go
with blacklist or whitelist approach).

I would assume that the best way to go about this would be to create a
plugin implementing the ITicketChangeListener interface. (If not, what
would?)

Actually it's not that simple as there is no interface that already does what you need.

I'd recommend the following approach:
1. Write something so you can suppress some comments from being shown:
   for example just the first comment (=> proof that you can add your
   own logic).
   Could be that you have to modify Ticket.get_changelog. Which in turn
   requires to write your own TicketModule+TicketSystem (or modify the
   existing ones with inheritance)
2. Decide how you store the public/private data (might be hard because
   of the denormalized storage of comments)
3. Write a ticket change listener as you proposed
4. inject your UI (can be done by an IRequestFilter)
5. write a some RequestHandler so you can set/unset the public/private
   for a comment

HTH
fs

--
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to