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:

  1. Connects to your FogBugz installation
  2. Runs a query to see what things have been worked on today
  3. If there are any items that don’t have an end date, then it’s the case that’s currently being worked on
  4. Get the details of the case
  5. Use notify-send to pop up a notification bubble showing case number, title, estimated time and time remaining.

FogBugz Active Case Notification

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.

2 Comments

Other Links to this Post

RSS feed for comments on this post. TrackBack URI

Leave a comment

WordPress Themes