Setting up Perforce (DTG)
There are two steps in setting up FogBugz-Perforce integration:
- Installing either trigger scripts or the Perforce Defect Tracking Gateway so that Perforce transmits changes to FogBugz
- Getting FogBugz to provide links to P4Web, the Perforce web client
Make sure to start your integration by setting up the Perforce repository in FogBugz according to these instructions.
Getting Perforce to transmit changes to FogBugz
These instructions are for setting up the Defect Tracking Gateway, so that cases from FogBugz will show up in Perforce. (See instructions for setting up a trigger script in VBScript, or a trigger script in Perl)
Requirements
- Perforce Server 2006.2 or later
- 32-bit Windows XP or Windows Server 2003
Note that this does not need to be the same server as your Perforce or FogBugz installation. It can be any computer that can communicate with both.
There are three essential components for setting up the DTG integration:
1. The Perforce Defect Tracking Gateway (DTG) (installed on your server)
The Perforce DTG, created and supported by Perforce, provides a service
that does the following:
-
Periodically query any configured defect tracking systems for case information, and then
update or create an associated job in Perforce.
-
Periodically query Perforce for any new changesets, and send the information to the
associated defect tracking system.
Note that by default, the Perforce DTG does not have any FogBugz integration.
Setup
- Download the DTG Setup program from the Perforce downloads page.
- Run the setup program and follow the instructions provided.
2. The FogBugz DTG Integration Plugin (installed in FogBugz)
DTG integration in FogBugz requires that the FogBugz plugin be installed.
The plugin configures FogBugz to accept changesets from the Perforce DTG,
and allows downloading the FogBugz - Perforce DTG link for step 3.
Setup for Licensed FogBugz Users:
- Download the Perforce DTG Integration plugin .zip file from the FogBugz Plugin Gallery.
- In your FogBugz installation, navigate to Admin > Plugins
- Click "Upload Plugin", and select the .zip file
Setup for FogBugz On Demand Users:
- In your FogBugz installation, navigate to Admin > Plugins
- Click the link to the FogBugz Plugin Gallery
- Find the Perforce DTG Integration and click "Install"
- You should be redirected back to your FogBugz account, and asked to confirm if you want to install the plugin. Click "OK" to install.
3. The FogBugz-P4DTG Link (installed on your server)
By default, the DTG does not have FogBugz support installed. To add FogBugz support,
and configure the DTG to communicate with FogBugz, you must install the FogBugz-P4DTG
Link.
Setup:
-
Create a new Perforce repository
- In your FogBugz account, navigate to Admin > Source Control
- Click "Create New Repository"
- Select "Perforce" and select a name for the repository
- Click OK
-
Install the FogBugz-P4DTG Link
- Click the edit link on the Perforce Repository
- Select the DTG tab
-
Click the link to the Perforce DTG Integration Setup
- Enter your Perforce server, user, and password, and FogBugz user and password
- Select the fields you wish to copy to Perforce
- Click OK
- Download and run the setup program
- When prompted, enter the location of the Perforce DTG
installed previously (typically C:\Program Files\Perforce\p4dtg)
-
After installation is done, you'll need to update your Perforce jobspec and configure the plugin.
- If you're already logged in as a Perforce administrator, the setup program will launch the jobspec editor automatically. If not, you'll need to log in as a Perforce administrator and enter p4 jobspec on the command line (cmd window), or type p4 jobspec -u [admin user name] -P [admin password]
- Copy the lines given by the setup page in FogBugz into your jobspec
- Save and close the window
- Setup should automatically open the configuration editor. You can also find this program in [Your Perforce DTG install]\p4dtg-config.exe.
- Check that each tab indicates that the configuration is correct, as described in the setup page
- On the final tab, click "Start Replication" to start the replication engine
Troubleshooting
If there are any errors, or cases do not seem to be appearing on FogBugz, check the log file in
[Your Perforce DTG install]\repl\log-FogBugzPerforceMapping.log
Once you've resolved the problem, run the configuration editor at
[Your Perforce DTG install]\p4dtg-config.exe
to restart replication.
Getting FogBugz to provide links to P4Web, the Perforce web client
In order to browse a Perforce repository, you need something that allows you to view file diffs and history logs from a web browser. With Perforce, you use P4Web, the Perforce Web Client.
Once that is installed and working with your Perforce repository, follow these instructions to point FogBugz at your P4Web server for diff and log links.