import_issues.py

import_issues.py imports issues from a CSV file into a Google Code project hosting issue tracker. It uses the Issue Tracker API and authenticates via OAuth, so it never sees your username or password. Download it and try it out!

Usage: import_issues.py PROJECT FILENAME

where PROJECT is the Google Code project name and FILENAME is the CSV file to import.

Example run:

$ ./import_issues.py mockfacebook new.csv
Opening a web page in your browser to request access.
Please click the Grant access button.
Importing new.csv into mockfacebook's issue tracker...
Imported 3 issues.

The CSV columns are: title, content, author, status, owner, labels, cc. Title, content, and author are required, but the rest are optional, so the file may have anywhere from 3 to 7 columns. If the file has a header with the column names above, it will be skipped. Leading and trailing whitespace will be trimmed from fields. Labels and cc are space- or comma-separated lists of values. If comma-separated, the entire field must be enclosed in quotes.

Requires gdata-python-client 2.0.7 or higher. If you don’t already have it, here are commands to download and install it in the same directory as this script:

wget http://gdata-python-client.googlecode.com/files/gdata-2.0.15.tar.gz
tar xzf gdata-2.0.15.tar.gz
ln -s gdata-2.0.15/src/gdata
ln -s gdata-2.0.15/src/atom

import_issues.py is in the public domain.

Leave a Reply

Your email address will not be published. Required fields are marked *