Import or update tickets in batch from an Excel or CSV file into Trac
Description
This plugin lets you import into Trac a series of tickets from a CSV file or (if the xlrd library is installed) from an Excel file.
You can also use it to modify tickets in batch, by saving a report as CSV, editing the CSV file, and re-importing the tickets.
This plugin is very useful when starting a new project: you can import a list of requirements that may have come from meeting notes, list of features, other ticketing systems... It's also great to review the tickets off-line, or to do massive changes to tickets.
Based on the ticket id (or, if no id exists, on the summary) in the imported file, tickets are either created or updated.
It is used by software products development teams daily on several projects in at least three companies.
Known issues
There are very few known issues, please report any problem you get !
In general, it's better to use Excel than CSV, as CSV files have limitations (character sets, in particular).
The main known issue, is that this plugin is not really designed to help you migrate tickets from one system to another: it cannot keep the ticket numbers when creating new tickets, nor keep the history for existing tickets. See #4783 and #5504 for details.
Finally, this plugin is not maintained for Trac 0.10 anymore: the 0.10 builds are known to work, but do not have the latest features (importing comments, in particular).
Installation
Machine-wide installation
For a machine-wide installation, run as root on your machine:
- easy_install http://trac-hacks.org/svn/ticketimportplugin/0.10 for Trac 0.10, or
- easy_install http://trac-hacks.org/svn/ticketimportplugin/0.11 for Trac 0.11.
Japanese localize
Trac instance installation
For an installation for only one Trac instance (on Trac 0.10, requires the Admin plugin):
- Download
- TicketImport-0.6c-py2.4.egg for Trac 0.10 on Python 2.4, or
- TicketImport-0.6c-py2.5.egg for Trac 0.10 on Python 2.5, or
- TicketImport-0.8-py2.4.egg for Trac 0.11 on Python 2.4, or
- TicketImport-0.8-py2.5.egg for Trac 0.11 on Python 2.5, or
- TicketImport-0.8-py2.6.egg for Trac 0.11 on Python 2.6.
- Install using the Admin UI in Trac.
xlrd installation (optional)
To be able to import Excel files, xlrd must be installed. xlrd is a Python library, not a Trac plugin. Take the latest binary from http://pypi.python.org/pypi/xlrd. On windows, run the installer; on other platforms, just unzip the .zip, and copy the "xlrd" folder that it contains, into the "site-packages" folder of the Python lib, for example:
$ easy_install xlrd
To verify that it's correctly installed, run python -c 'import xlrd' from the command line: it should not cause an error.
Configuration
Restart Trac (or your Apache server). The "TicketImport?" plugin should now appear in the "Manage Plugins" page of the Admin tab. Enable it. If you don't have the Admin plugin (on 0.10), you need to enable the plugin by putting:
[components] talm_importer.importer.* = enabled
in your trac.ini file (under the "conf" directory of your Trac instance).
Then, you need to give some user(s) the right to user Import module. To do that, you must give them IMPORT_EXECUTE permission, either in the Admin UI (on 0.11) or with the admin command-line tool, like this:
$ trac-admin /your/trac/installation/folder permission add your_user IMPORT_EXECUTE
Wish to personalize navigation label:
[mainnav] importer.label = Import Tickets
Wish to modify label ordering:
[trac] mainnav = wiki,browser,roadmap,...,importer,...,admin,search
Source
You can check out TicketImportPlugin from here using Subversion, or browse the source with Trac. You can also download the zipped source from here.
Example
Once you have enabled the plugin and given yourself IMPORT_EXECUTE permission, you will see a new Import tab in the main navigation. This tab contains a complete documentation on exactly how the import works, as well as a form to select the CSV or XLS file to upload:
Once you have uploaded it, a preview screen shows you what will be imported and let you confirm the import.
Change history for this plugin
[7890] by farialima on 04/27/10 00:28:53
Made the tests pass on Trac 0.12
[7882] by farialima on 04/23/10 21:46:26
Fix to previous commit: made it run on Python2.4
[7881] by farialima on 04/23/10 20:16:56
Added support for \'comment\' column (import them as comments). Also a fix when a lookup starts with a space
[5305] by farialima on 02/23/09 20:25:01
Upped version and made a build with fix for bug #4458
[5304] by farialima on 02/23/09 20:10:24
fix for bug #4458
[5303] by farialima on 02/23/09 20:04:55
fix for bug #4458
[5132] by farialima on 01/14/09 15:26:09
Added test for #4450
[5131] by farialima on 01/14/09 15:03:34
fix for #4450, and a few cleanups
[5093] by farialima on 01/06/09 16:27:31
Fix for ticket #4392
[5091] by farialima on 01/05/09 17:06:01
moved 0.10 version to the 0.10 branch
[5090] by farialima on 01/05/09 17:03:08
upgraded to 0.11: use Genshi instead of Clearsilver
Author/Contributors
Author: farialima
Contributors:
Attachments
- import-wizard.png (206.2 kB) -
Screenshot of the Import screen
, added by farialima on 01/03/09 17:34:53. - TicketImport-0.6-py2.5.egg (39.7 kB) - added by farialima on 01/03/09 17:50:25.
- TicketImport-0.6-py2.4.egg (40.1 kB) - added by farialima on 01/03/09 17:50:33.
- TicketImport-0.7-py2.4.egg (34.5 kB) - added by farialima on 01/05/09 17:13:37.
- TicketImport-0.7-py2.5.egg (34.2 kB) - added by farialima on 01/05/09 17:13:48.
- TicketImport-0.7a-py2.4.egg (37.5 kB) - added by farialima on 01/06/09 16:30:09.
- TicketImport-0.7a-py2.5.egg (37.1 kB) - added by farialima on 01/06/09 16:30:21.
- TicketImport-0.6c-py2.5.egg (40.3 kB) - added by farialima on 02/23/09 20:25:44.
- TicketImport-0.6c-py2.4.egg (40.6 kB) - added by farialima on 02/23/09 20:25:54.
- TicketImport-0.7c-py2.5.egg (37.6 kB) - added by farialima on 02/23/09 20:26:01.
- TicketImport-0.7c-py2.4.egg (37.9 kB) - added by farialima on 02/23/09 20:26:09.
- TicketImport-0.8-py2.5.egg (38.5 kB) - added by farialima on 04/23/10 20:45:09.
- TicketImport-0.8-py2.4.2.egg (38.9 kB) - added by farialima on 04/23/10 21:53:23.
- TicketImport-0.8-py2.4.egg (38.9 kB) - added by farialima on 04/23/10 21:53:35.


