FogBugz 7 Online Help

Writing Your Own Plugin

[Note: This is intended as a brief introduction. Go to the FogBugz Developers Wiki to learn about Plugin development from start to finish.]

How Plugins Work

FogBugz plugins are .NET assemblies that run on the FogBugz server. Plugins interact with FogBugz in two ways: interfaces and APIs. Together, they allow plugins to extend and expand the power of FogBugz.

Interfaces

All FogBugz plugins implement one or more interface. Interfaces control when and how FogBugz calls into the plugin; for example, the methods of the IPluginBugDisplay interface will be called whenever a bug is being displayed or edited, allowing a plugin to add its own display elements to the bug page. A complete list of the predefined interfaces with examples and links to the class library documentation can be found here.

APIs

FogBugz plugins also have access to a variety of plugin APIs (contained in the FogCreek.FogBugz.Plugins namespace) which allow plugins to communicate with FogBugz. For example, an API method might load a CBug object (a case), make changes and commit it back to the database. APIs allow plugins to request a wide variety of data from FogBugz and manipulate it in various ways. More information on the APIs that plugins can use can be found in the FogBugz Class Library Documentation.

Setting Up the Development Environment

FogBugz plugins can be written in any .NET language, but all of our example code is written in C#. We highly recommend that you install FogBugz locally on your development machine and test your Plugin there, rather than testing it on your live FogBugz server.

Microsoft Visual Studio is a excellent development environment for FogBugz Plugins. If you don't already have a Visual Studio license, the free "Express" version works well.