FogBugz “Active Project” notification tool
At Turboweb we’ve recently subscribed to a 5-user on-demand license for an awesome case tracking system called FogBugz. For us it means that we have controlled workflow of cases (bugs, features, enquiries etc.) along with awesome estimation reporting and time tracking. FogBugz was built with development teams in mind and it’s a very nice tool.
Anyway, one of the things it has is a nice API which you can use to interrogate the product (read and write) and this got me thinking about how I could use the API to remind me what I should currently be working on. Thus was created the “FogBugz Notification Tool”.
This script does the following:
- Connects to your FogBugz installation
- Runs a query to see what things have been worked on today
- If there are any items that don’t have an end date, then it’s the case that’s currently being worked on
- Get the details of the case
- Use notify-send to pop up a notification bubble showing case number, title, estimated time and time remaining.

I have found this most effective if I put it in my crontab to run every 5 minutes.
Requirements:
- Ubuntu Linux (or any version of Linux that supports the “notify-send” command)
- PHP5 CLI (simply because this script is written with PHP)
- The “libnotify-bin” package (this provides the “notify-send” command, try “sudo apt-get install libnotify-bin”)
The script requires a little configuration for your circumstances, but this is easily done by editing the defined constants in the script:
// Adjust these defines to suit your installation define( 'FBBASEURL', 'https://mywebsite.fogbugz.com/' ); define( 'FBUSERNAME', 'my@email.address.com' ); define( 'FBPASSWORD', 'mypassword' );
And to add it to your crontab, simply add this line (note the */5 means every time the current number of minutes in the hour is evenly divisible by 5)
*/5 * * * * DISPLAY=:0.0 /usr/bin/php /home/bob/fogbugz-notify.php
Of course, adjust the path appropriately.
- Download the script here (9.1kB)
2 Comments
Other Links to this Post
RSS feed for comments on this post. TrackBack URI
By
Dan Wilson, December 10, 2009 @ 4:58 am
Looks awesome, I’ll be sure to include this on our API extras page (http://www.fogcreek.com/FogBugz/Extras.html) for sure.
Great to have you in the FogBugz development community.
Dan Wilson
Fog Creek Software
By
GuruBob, December 10, 2009 @ 8:48 am
Thanks Dan, appreciated. Nice to be in the community.