FogBugz 7 Online Help

Setting up Perforce (DTG)

There are two steps in setting up FogBugz-Perforce integration:

  1. Installing either trigger scripts or the Perforce Defect Tracking Gateway so that Perforce transmits changes to FogBugz
  2. 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

  1. Perforce Server 2006.2 or later
  2. 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:

Note that by default, the Perforce DTG does not have any FogBugz integration.

Setup

  1. Download the DTG Setup program from the Perforce downloads page.
  2. 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:

  1. Download the Perforce DTG Integration plugin .zip file from the FogBugz Plugin Gallery.
  2. In your FogBugz installation, navigate to Admin > Plugins
  3. Click "Upload Plugin", and select the .zip file

Setup for FogBugz On Demand Users:

  1. In your FogBugz installation, navigate to Admin > Plugins
  2. Click the link to the FogBugz Plugin Gallery
  3. Find the Perforce DTG Integration and click "Install"
  4. 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:

  1. Create a new Perforce repository
    1. In your FogBugz account, navigate to Admin > Source Control
    2. Click "Create New Repository"
    3. Select "Perforce" and select a name for the repository
    4. Click OK

  2. Install the FogBugz-P4DTG Link
    1. Click the edit link on the Perforce Repository
    2. Select the DTG tab
    3. Click the link to the Perforce DTG Integration Setup
      1. Enter your Perforce server, user, and password, and FogBugz user and password
      2. Select the fields you wish to copy to Perforce
      3. Click OK
    4. Download and run the setup program
    5. When prompted, enter the location of the Perforce DTG installed previously (typically C:\Program Files\Perforce\p4dtg)
    6. After installation is done, you'll need to update your Perforce jobspec and configure the plugin.
      1. 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]
      2. Copy the lines given by the setup page in FogBugz into your jobspec
      3. Save and close the window
    7. Setup should automatically open the configuration editor.  You can also find this program in [Your Perforce DTG install]\p4dtg-config.exe.
    8. Check that each tab indicates that the configuration is correct, as described in the setup page
    9. 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.