We currently use FogBugz at work, and I'm using the URLTrigger plugin to call out to a CGI script every time a case is 开发者_C百科changed. I'm trying to figure out how to do something similar with Trac; does anyone know if this is possible? I can't find any plugins or discussion on it.
t-h.o is the first address to seek for Trac plugins. Because Trac is actively encouraging plugin development by it's sophisticated Component Architecture since early days, you'll find a lot of code. And since Trac core developers have been involved, this is often quite good code quality too. Stuff you'll read to get an idea on how things are supposed to work.
Maybe you'll want to start with current official wiki docs to dive into Plugin Development for Trac and change over to trac-hacks.org afterwards.
Regarding your declared development goal especially look at trac.ticket.api.ITicketChangeListener
- an extension point interface for components that require notification on when tickets are created, modified, or deleted. Sounds like this is just what you want.
You'll need to (rough list of requirements)
- create a class based on trac.core.
Component
that implements (ITicketChangeListener)
- provide modules exactly as required by the interface definition
If you need more details, I'd recommend to look at the DefaultCcPlugin source. There are many more plugins implementing the ITicketChangeListener interface, but this is a rather small plugin, that'll just show you the available methods and not distract with too much functionality around them.
Add information to your question as you progress, or Comment here as required. I'll try to guide you further on to the best of my own knowledge.
精彩评论