This article refers to the URL Trigger feature that is present on FogBugz For Your Server installations. For the FogBugz On Demand and FogBugz On Site equivalent, please see “Webhooks“.
The URL Trigger functionality (a.k.a. web hooks) allows you to specify an HTTP request to be sent to a specific URL when events occur in FogBugz. To create a URLTrigger, select one or more events that your trigger will respond to, then add values to the URL query string using a list of variables presented by the plugin.
The URL Trigger plugin should be installed by default, but if it is not installed on your FogBugz site, you can download it from the gallery. Once it is installed, it will be available as an option in the Admin menu. From the URL Trigger page, you’ll be able to create and edit custom URL triggers, import or export triggers and view the log of trigger activity.
To create a trigger, click Add New Trigger and specify the following:
You can create triggers which fire on any of the following event types:
- Case Events: status changes, edits, assignments, email events
- Discuss Topic Events: discussion thread creation, discussion post creation
- Source Control Events: source control commits
- Wiki Events: wiki page creation, wiki page edits
- Time Tracking Events: time interval creation, edits, and deletion
URL With Parameters
Once you’ve subscribed to a set of events, you can specify the URL to which the request will be sent, and attach one or more variables provided by those events to the querystring. The list of available variables will change dynamically depending on which events you’ve selected.
If you’d only like a request to be sent if a certain set of conditions are met, you can also choose to apply a filter, a logical expression containing one or more variables. A request will only be sent if the logical expression evaluates to TRUE.
More Information on Usage
URLTrigger allows for a sort of event-driven behavior. Although you can use the FogBugz API to retrieve basically all of the same information which URLTrigger can provide you, your external app would be polling for information from FogBugz. URLTrigger allows you to essentially subscribe to FogBugz events, and thus your external app can have an event-driven architecture rather than a polling-based one.