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: , , ,

posted @ Friday, September 28, 2007 2:22 AM

Print
Comments have been closed on this topic.
«April»
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910