Overview
You may have a large number of tasks that you want to import to FogBugz. You can do it by using the FogBugz XML API as described below.
Prerequisites
- Ensure that Wget is installed in the system.
- Download it as a self-contained executable file.
- Save this file in a System path (i.e.,
C:\Windows
orC:\windows\system32\
folders).
- Download the example Excel workbook with the UrlEncode function.
Process
For example, you have 500+ tasks in Excel with the following columns:
To import them into FogBugz using the API, follow the steps below:
- Get an API token.
Note: API tokens last until you click log off in the web interface. - Add a UrlEncode function to your Excel workbook.
Review the article on how to add a module, or custom function, to Excel for additional details. - Add a
Command
column to the worksheet containing the tasks, with this formula:
="[YOUR FOGBUGZ URL]/api.asp?token=" & "<INSERT_TOKEN>" & "&cmd=new" & "&sProject=" & urlencode(A2) & "&sArea=" & urlencode(B2) & "&sTitle=" & urlencode(C2) & "&sFixFor=" & urlencode(D2) & "&sPersonAssignedTo=" & urlencode(E2) & "&ixPriority=" & F2 & "&sTags=" & SUBSTITUTE(G2," ",",") & "&sEvent=" & urlencode(H2)
NOTE: Replace <INSERT_TOKEN> above with the value from step 1. You can also add additional fields supported by the API, including custom fields by adding columns and the appropriate parameter to the formula.
- Copy and paste the contents of the Command column from your excel spreadsheet into a text file,
fb.txt
so that it contains all the URLs from the command column of your spreadsheet in the following format:
https://[your site].fogbugz.com/api.asp?token=xxxxx&cmd=new&sProject=Sample
- Create a batch file,
fb.bat
, containing the following command:
wget --spider --no-check-certificate -i "x:\users\bob\desktop\fb.txt"
It tells
wget
to hit all the URLs listed in the text file. The--spider
switch tells it to ignore the results rather than saving them as a file; the--no-check-certificate
switch tells it to ignore SSL certificate issues. - Run the created batch file.
Confirmation
Once you run the batch file, your cases should get created. For example:
Do not hesitate to contact us if you have any questions!