posted on Friday, September 28, 2007 2:22 AM by thomasswilliams

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

Comments

# Interesting Finds: September 28, 2007 @ Friday, September 28, 2007 10:01 AM

Anonymous

# 5 Tips for Working With BugTracker.NET @ Sunday, September 30, 2007 11:52 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Anonymous

# re: 5 Tips for Working With BugTracker.NET @ Sunday, September 30, 2007 1:06 PM

I'm the author of BugTracker.NET. If folks have problems or questions, the support forum is here:
http://sourceforge.net/forum/forum.php?forum_id=226938

Regarding point #3 above, instead of using the user defined attribute for sub-projects, consider using the project-specific custom dropdowns, so that the sub-project choices in the dropdowns can be different for each project.

(Another option for custom fields is to go to admin and then the "custom-fields" page.)

Corey Trager

# re: 5 Tips for Working With BugTracker.NET @ Sunday, September 30, 2007 11:48 PM

Thanks Corey for the feedback - I think the project-specific dropdown is *exactly* what I need here.

For now I'm happy with how quickly I got BugTracker.NET up and running - and I also managed to get my customised "SubProject" in a filter combo on the bugs list page (which looks harder to do with project-specific dropdowns).

Cheers, Thomas

thomasswilliams

# OT: Merry Christmas and Blog Stats 2007 Edition @ Monday, December 17, 2007 9:53 PM

Merry Christmas to all my reader(s). I hope you have a great Christmas and New Year, and I’ll see you...

Anonymous