To FogBugz With Python

A couple of weeks ago, I announced the pyfogbugz project that will, when complete, serve as a python wrapper around the FogBugz API. I have had very little time to spend on it recently so it has not progressed much at all. However, one feature that I have added recently is the ability to use the simple BugzScout interface for submitting bug reports.

The one feature about this interface that solves an immediate problem for me is being able to deal with duplicate exception reports. One of my major annoyances with picking up exception reports from an email inbox that FogBugz creates tickets from is that it can't deal with duplicates, so I end up spending a lot of time gardening tickets that are duplicates of each other.

BugzScout will solve this problem by automatically appending to a ticket that has an identical title. I find this extremely useful.

While the library is not comlete, the BugzScout part of it is usable. To install and use:

git clone git://github.com/paltman/pyfogbugz.git
cd pyfogbugz 
pylink pyfogbugz   ## See link [1] to Eric Florenzano's post

Now in your python script:

from pyfogbuz.scout import post_report
post_report('title of the report', 'body of the report -- what wil be appended to ticket if dupe title')

You may be wondering, how does it know where to submit my tickets. Good question! See the README for a sample configuration file. Put configuration options in a file at one of the following two places:

/etc/pyfogbugz.cfg
~/.pyfogbugz

A then correct the sample settings to match your own.

Next step for me will be to wire up this function call somewhere in the Django stack to send exception reports using this script in addition to the email (or maybe I just setup a script to read the email inbox) and then turn off email reading from FogBugz.

[1] Eric Florenzano's pylink