<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Confessions of a Guru &#187; fogbugz</title>
	<atom:link href="http://www.guru.net.nz/blog/category/fogbugz/feed" rel="self" type="application/rss+xml" />
	<link>http://www.guru.net.nz/blog</link>
	<description>Random stuff from a Dunedin (NZ) based web developer, beer drinker and dad</description>
	<lastBuildDate>Wed, 14 Dec 2011 09:18:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>FogBugz &#8220;Active Project&#8221; notification tool</title>
		<link>http://www.guru.net.nz/blog/2009/12/fogbugz-active-project-notification-tool.html</link>
		<comments>http://www.guru.net.nz/blog/2009/12/fogbugz-active-project-notification-tool.html#comments</comments>
		<pubDate>Wed, 09 Dec 2009 10:50:36 +0000</pubDate>
		<dc:creator>GuruBob</dc:creator>
				<category><![CDATA[fogbugz]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.guru.net.nz/blog/?p=309</guid>
		<description><![CDATA[At Turboweb we&#8217;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&#8217;s a very nice tool. [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.turboweb.co.nz">Turboweb</a> we&#8217;ve recently subscribed to a 5-user on-demand license for an awesome case tracking system called <a href="http://www.fogbugz.com">FogBugz</a>.  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&#8217;s a very nice tool.</p>
<p>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 &#8220;FogBugz Notification Tool&#8221;.</p>
<p>This script does the following:</p>
<ol>
<li>Connects to your FogBugz installation</li>
<li>Runs a query to see what things have been worked on today</li>
<li>If there are any items that don&#8217;t have an end date, then it&#8217;s the case that&#8217;s currently being worked on</li>
<li>Get the details of the case</li>
<li>Use notify-send to pop up a notification bubble showing case number, title, estimated time and time remaining.</li>
</ol>
<p style="padding-left: 30px;"><img class="alignnone size-full wp-image-310" title="FogBugz Active Case Notification" src="http://www.guru.net.nz/blog/wp-content/uploads/2009/12/fb-activecase.png" alt="FogBugz Active Case Notification" width="381" height="267" /></p>
<p>I have found this most effective if I put it in my crontab to run every 5 minutes.</p>
<p>Requirements:</p>
<ul>
<li>Ubuntu Linux (or any version of Linux that supports the &#8220;notify-send&#8221; command)</li>
<li>PHP5 CLI (simply because this script is written with PHP)</li>
<li>The &#8220;libnotify-bin&#8221; package (this provides the &#8220;notify-send&#8221; command, try &#8220;sudo apt-get install libnotify-bin&#8221;)</li>
</ul>
<p>The script requires a little configuration for your circumstances, but this is easily done by editing the defined constants in the script:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">// Adjust these defines to suit your installation</span>
	<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FBBASEURL'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'https://mywebsite.fogbugz.com/'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FBUSERNAME'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'my@email.address.com'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'FBPASSWORD'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mypassword'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>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)</p>
<pre>*/5 * * * * DISPLAY=:0.0 /usr/bin/php /home/bob/fogbugz-notify.php</pre>
<p>Of course, adjust the path appropriately.</p>
<ul>
<li><a href="http://www.guru.net.nz/blog/fogbugz-notify.tar.gz">Download the script here</a> (9.1kB)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.guru.net.nz/blog/2009/12/fogbugz-active-project-notification-tool.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

