A forum for technical support discussion related to Fogbugz.
[We're new FogBugz users, so please bear with me.]
Is it possible to add a new category to the built-in FogBugz list (Bug, Feature, Inquiry)?
If that's not possible, or not particularly easy, how about renaming one of the existing 3 categories? For example, if we wanted to change "Inquiry" to "Task"... would that be easy?
Adding a row works at first glance, but it is hard coded in places, for example minireports and the lang file. You'll also end up with the default 'bug' icon.
Monday, February 20, 2006
We added a new Task category with it's own icon and own set of status values. We also made it available for filtering. Took about an hour (most of the time spent in making the 15x15 icon look good).
Here are the basic steps to add a Task category:
-- Add a row into the Category table. Just use a bogus value for the default status until you give the new Category it's own set of status values:
INSERT INTO Category (sCategory, ixStatusDefault) VALUES ('Task', -1)
-- Add some Status values:
INSERT INTO Status (sStatus, ixCategory) VALUES ('Resolved (Completed)', 4)
In this case, the category value of 4 corresponds to the new record added to the category table.
-- Update the Category table so that it's default status points to the new status value:
UPDATE Category SET ixStatusDefault = 15 WHERE oxCategory = 4
In this case, the status value of 15 corresponds to the new status we added to the Status table
-- Create new icons. The easiest thing to do is just copy/edit the sidebar-ico-bug.gif and the sidebar-ico-bug-naa.gif icons found in the website/images folder. Name them sidebar-ico-task.gif and sidebar-ico-task-naa.gif.
-- Edit the icons.asp and add a new entry to the Select Case (ixCategory) statement in the CategoryIcon subroutine If you want to be thorough, you can add the text constant "Task" in lang.asp. Alternatively, you could just be lazy and hardcode the text constant in the icons.asp file as in the following example:
Sub CategoryIcon( ByVal ixCategory, sClass )
Dim sImg, sAlt
Select Case( ixCategory )
sImg = "sidebar-ico-feature-naa.gif"
sAlt = FB_CATEGORY_FEATURE
sImg = "sidebar-ico-email-naa.gif"
sAlt = FB_CATEGORY_INQUIRY
sImg = "sidebar-ico-task-naa.gif"
sAlt = "Task"
sImg = "sidebar-ico-bug-naa.gif"
sAlt = FB_CATEGORY_BUG
-- Edit the miniReports.asp file and, similar to the changes made in the icons.asp file, add the new category to the Select Case (ixCategory) statement in the MiniReportCategoryIcon subroute.
-- Edit the CFilter.asp file and add the new category to the Select Case (ixCategory) statement in the AsText function as in the following example:
Select Case (ixCategory)
Case 1: sBugs = FB_FILTER_BUGZ
Case 2: sBugs = FB_FILTER_FEATURES
Case 3: sBugs = FB_FILTER_REQUESTS
Case 4: sBugs = "tasks"
Case Else: sBugs = FB_FILTER_CASES
You'll also need to modify the Get FilterOption Category section of the CFilter.asp file as in the following example:
'Get FilterOption Category
Set opt = New CFilterOption
opt.rgArg = Array("ixCategory")
opt.rgVal = Array( Array("1", FB_FILTER_BUGZ), _
Array("2", FB_FILTER_FEATURES), _
Array("3", FB_FILTER_REQUESTS), _
Of course, you could add the text contstant "tasks" to the lang.asp file if you wanted to and then use the constant.
Viola! You now have your own category with its own icon and it even works correctly with the filter. Of course, the next time you upgrade FogBugz you may lose your changes. I suppose there's always a price to pay, eh?
One additional note on adding a category:
You don't need to edit the MiniReports.asp file as described above because you won't get your category to show up in the Mini Reports without modifications to lots of additional files.
The Mini Reports are the "Open cases by project", "Open cases by dept", etc. tables that are visible in the left-hand side of the list view)
Not having your custom category in the Mini Reports isn't that big of a deal because you can still filter by the category in Grid View to see exactly what you want to see.
This topic is archived. No further replies will be accepted.Other recent topics