September 2007 - Posts

5 Tips for Working With BugTracker.NET

Recently I downloaded BugTracker.NET, an excellent ASP.NET/C#/Sql Server open-source bug tracker developed by Corey Trager. Set up was very simple - just read the README file!

I really like how flexible BugTracker.NET is. Below are 5 of the simple changes I made, to make the product better suit my needs.

1. Set a different background color for "Closed" Bugs
"Closed" bugs are marked with status 5 (by default). You can enhance the built in background colors on "bugs.aspx" by checking for status 5 and setting a different background color in queries.

First go to the "queries" page, and select edit on one of the queries. Then, incorporate the snippet below which sets the first returned field to a light grey background color if the bug is closed:

select CASE WHEN ISNULL(bg_status, 0) = 5 THEN '#cecece' ELSE isnull(pr_background_color,'#ffffff') END, ...[rest of query]

Note that this first field has no alias, and needs to start with a hash character to be used in the "bugs.aspx" screen as a color.

2. Play around with CSS for your own styles
The main cascading style sheet for BugTracker.NET is called "btnet_base.css". Any changes you make to this file may be overwritten during an upgrade, so make sure you save a copy.

The first change I made was removing the hard-coded text sizes (for example, "8pt") and replacing them with relative EM values. Here's a link to my current "btnet_base.css" file with notes on the CSS selectors I've managed to figure out, ready to make your own customisations: BugTracker.NET 'btnet_base.css' Customisations

3. Use the "User-Defined Attribute" in queries
At first I removed the user-defined attribute using the web.config file, but I quickly brought it back in and used it for "sub projects". Here's an SQL snippet to get the user-defined attribute to appear in queries (first, go to the "queries" screen and edit a query):

SELECT [rest of query]...isnull(uda.udf_name, '') AS [user defined attribute]...[rest of query]...
FROM ...[normal from clause, which will include the "bugs" table] left outer join dbo.user_defined_attribute uda on bugs.[bg_user_defined_attribute] = uda.[udf_id]

It's important to use a LEFT OUTER JOIN to the "user_defined_attribute" table so that bugs without any user-defined attribute will still be returned.

4. Create useful categories
I used Bugzilla's "Severity" field as a model for creating useful categories. These new categories work hand-in-hand with priorities. My text is fairly verbose - you might want to go with something simpler like Bugzilla's severity definitions which I found here.

Here's my new category list (you can see I also use it for tracking enhancement requests, as opposed to just bugs):

  • Application Unusable
  • Critical - no workaround
  • Major - workaround exists
  • Normal
  • Enhancement Request
  • Minor Cosmetic Request

5. Set the "AbsoluteUrlPrefix" in web.config
There's lots of well-documented changes you can make to web.config. If you're using e-mail notifications, you need to remember to change the "AbsoluteUrlPrefix" key to point to your virtual directory.

For instance, if you've installed BugTracker.NET on a server called DOGBERT in the virtual directory BTNET, your new "AbsoluteUrlPrefix" key would look like:

<add key="AbsoluteUrlPrefix" value="http://dogbert/btnet/" /> 

I hope these tips help in your use of BugTracker.NET. Of course there's a lot of room for customisation of the source code or database tables, however, this is outside the scope of this article.

Good luck!

Tags: bugtracker.net, bug, customisation, development

If I needed to execute SQL scripts on multiple servers...

...I'd be using Red Gate's SQL Multi Script. The initial "alpha" version is available now for free. I've given it a whirl and it works exactly as advertised, with further improvements in the pipeline too.

At first glance I thought a utility like this would be better off being built into SQL Server Management Studio. After using it (and reading on the forum what other users want it for), I reckon a small, stand-alone product is probably better.

I've been advised that this alpha release will stop working at the end of 2007.

Tags: sql server, database, script, server

A 5-second test for your User Interface

Here's an interesting metric (via Usability in the News) for testing websites:

Q: “What percentage of your interface contains stuff that your customers want to see?”

  1. 10%
  2. 25%
  3. 100%

If you answer a, or b then you might do well, but you'll probably get blown out of the water once someone decides to enter the market with option c.

(continued at "A really simple metric for measuring User Interfaces" at iQ Blog)

This test could easily be applied to utility-type software whether web or windows e.g. Flickr or WinZip (it would be a little harder to apply the principle to fully-fledged applications, where "infrastructure" user interface is impossible to avoid).

37 Signals calls this kind of approach "epicenter design" in its online book Getting Real - start with main thing the user will need, then the second most, then the third, and build outwards.

Tags: user interface, usability, design