Getting from Cases to Code and Vice Versa

The key to making sure that everything works together is that when you're checking in code to your source control system, you need to tell FogBugz which case this code is meant to address. How you do this depends on the source code control system. If you're using CVS, Perforce, Subversion, or Visual SourceSafe, you need to include a specially formatted line in your check-in comments. For example, if you're checking in code for case 2587, you need to include (on a line by itself)

BugzID: 2587

If you're using Vault, the procedure is a bit different. Because Vault includes deep FogBugz integration, there's a spot right on the user interface for including the FogBugz case number. Figure 6-3 shows the Vault Commit dialog box. You can fill in a FogBugz case number in the Update Bugs textbox to have the code automatically linked to that case.

Figure 6-3. Committing code in Vault with a FogBugz link

What does it look like in action? Bearing in mind that the details of the Web interface change from program to program, I'll demonstrate with a simple bug. Figure 6-4 shows the original FogBugz bug report, which calls for a couple of easy user interface changes.

Figure 6-4. A bug report that requires a code change

After inspecting the bug report, I check out the appropriate files to make the changes. At this point, FogBugz isn't involved, except to tell me what needs to be done. So I make the necessary changes in the source code and make sure the project still passes my own unit tests. Satisfied, I check in the files to my Vault server, making sure to note the bug number on the check-in.

Figure 6-5 shows the tester's view of the bug at this point. You'll see that in addition to the usual FogBugz information, FogBugz has added a number of hyperlinks in the Checkins area.

Figure 6-5. A bug report showing check-ins

Each file has two links. The first will take you to a screen containing the history of the file. Figure 6-6 shows this screen for a file in a Vault server. Hyperlinks let you see any version of the file, see its diff from the previous version, or tell who checked the changes in.

The other link displayed with each file takes you directly to a listing of the file, together with a diff from the previous version. Figure 6-7 shows a small portion of such a diff, which is color-coded to show lines that were added, deleted, or changed.

ä History: $/ServiceMonitor/frmAbout.vb - Microsoft Internet Explorer



File Edit View

Favorites Tools Help


Q Back - Ö T

0 H] ® | P Favorites »f Media © | 0 - & HI □


Address http : //www. larkf arm. com/Vault5ervice/Vault Web/VaultHistory. aspx?File= 10$/ServiceMonitor/f rm Ah ▼ | H Go



History: $/ServiceMonitor/frmAbout.vb


Logout |


Date Version Diff Blame Action



8/12/2005 from view rh , , . 7:02:30 AM £ previous blame

Fixed minor visual problems


8/6/2005 1 Si™ Created 7:11:48 AM L blame "-reared

Initial checkin




ij^t Done




Figure 6-6. File history shown in FogBugz

Figure 6-7. Viewingdiffs in FogBugz
0 0

Post a comment