Fog Creek Software
Discussion Board




Can I display the version in the Grid View?

It would be really helpfull to display the version where the bug is found in the grid view also, we never use the estimate column.  Is there a way to remove it from the Grid View?

Matt Hoffman
Wednesday, October 22, 2003

These changes cannot be made using the UI, but they are relatively simple modifications if you want to modify the source code ASP.

In List.asp:
Comment out line 42-52 like so:

Comment out line 386 like so:
<!-- th class="biglist" align="left"><%=FB_ESTIMATE%></th -->

That eliminates the estimate from the grid view and should get you started.. you can replace those lines with code that displays the version field instead with a little more work (like adding version to the SQL query)

Note: We cannot provide support for modified code.

Dmitri Kalmar
Wednesday, October 22, 2003

Thanks for your help!!!

Matt Hoffman
Tuesday, October 28, 2003

I used this tip to modify our install of Fogbugz to add in more columns to the grid view.  There are a few things that need to be done:

1. Make sure that column that you want to add is available in the record set that is passed to WriteBugGrid method in List.asp.

Here are all the fields that I saw in the recordset:

ixBug
sTitle
ixPriority
sPriority
ixPersonAssignedTo
sPersonAssignedTo
sPhoneAssignedTo
sEmailAssignedTo
fOpen
sProject
ixStatus
sStatus
sFullNameOpenedBy
ixFixFor
sArea
dtOpened
hrsRemaining
c
sCustomerEmail
ixMailbox
ixCategory
sFixFor
dtFixFor
hrsOrigEst

2. Add the table header code for the new column that you want to use.  Here is a sample of the code I added to the ShowDetails method in the list.asp file.  This code is if you want a column heading that can be sorted on -I had to add a FB_SORT_PROJECT_TITLE const to the lang.asp file. 

Also note the “sortID=3” in the query string.  This will determine the sort order for the filter that is created on the fly to handle the sort, in this case “project” is 3.  I found out the id I wanted by creating a test filter through the filter web page, setting the first sort by to “project”, then looking at the sort1 field in the filter table.

<th class="biglist" align="left">
<% If Request("search") >= "1" Then %>
  <%=FB_PROJECT%>
<% Else %>
  <a href="default.asp?pg=pgList&amp;pre=preSaveFilterChangeSort&amp;sortID=3" title="<%=FB_SORT_PROJECT_TITLE%>">
  <%=FB_PROJECT%>
  </a>
<% End If %>
</th>

3. Add the data for the new column.  In my case I just added <td class="biglist"><%=rs("sProject")%></td> to the WriteBugGrid method in List.asp.  This is why the first step was to check if the field was in the recordset.

Make sure you make a backup copy of the real files before you change them.  I’m providing this to help out but I take no responsibility for the contents of this post or any changes that you make to your FogBugz install.

Happy Customizing!

John Stetic
Tuesday, December 16, 2003

*  Recent Topics

*  Fog Creek Home