Version 41 (modified by François Granade, 6 years ago) (diff)


Import or update tickets in batch from an Excel or CSV file into Trac


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).

Japanese localization

A Japanese localization has been done, you can access it at (although it may not be the latest version).


Machine-wide installation

For a machine-wide installation, run as root on your machine:

  • easy_install for Trac 0.10, or
  • easy_install for Trac 0.11 or 0.12.

Trac instance installation

For an installation for only one Trac instance (on Trac 0.10, requires the Admin plugin):

  • Download the code (requires Subversion): svn co ticketimportplugin for Trac 0.10, or svn co ticketimportplugin for Trac 0.11 or 0.12
  • Build by hand: cd ticketimportplugin; python bdist_egg
  • !Install the egg created in the dist folder 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 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.


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:

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:

importer.label = Import Tickets

Wish to modify label ordering:

mainnav = wiki,browser,roadmap,...,importer,...,admin,search

If your excel spreadsheets contain date or date times, you can customize the format that will be used to import them:


The format is the Python fstrtime, see


You can check out TicketImportPlugin from here using Subversion, or browse the source with Trac. You can also download the zipped source from [download:ticketimportplugin here].


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:

Screenshot of the Import screen

Once you have uploaded it, a preview screen shows you what will be imported and let you confirm the import.

Importing tickets including history

To import tickets with history, they have to be imported in multiple go's. The first csv file should contain all tickets in new state. The second csv file the tickets in the next chosen states (can be any state known by the implemented ticket life cycle). Updates can include changes to the description, ownership and other fields.

Basically, the second and next csv file imports update the tickets imported from the first.

Change history for this plugin

16394 by rjollos on 2017-03-25 09:20:58
Remove eggs
16214 by jun66j5 on 2017-01-31 10:03:52
ticketimportplugin: fix openpyxl being unable to open temporary file without Excel file's extensions
16213 by jun66j5 on 2017-01-31 08:27:31
ticketimportplugin: support *.xlsx file format
16043 by jun66j5 on 2016-12-02 09:43:05
ticketimportplugin: use EnvironmentStub rather than Environment in unit tests
15949 by jun66j5 on 2016-11-10 18:57:59
ticketimportplugin: add missing file (refs #12931)
15948 by jun66j5 on 2016-11-10 15:13:59
ticketimportplugin: add support of Trac 1.1.2+ (closes #12931)
14097 by jun66j5 on 2014-08-17 01:09:08
ticketimportplugin: fixed a failure of unit tests with Trac 0.11.x
14096 by jun66j5 on 2014-08-17 00:45:07
ticketimportplugin: remove temporary environment on teardown of each test
14093 by jun66j5 on 2014-08-16 18:10:55
ticketimportplugin: fixed failures of unit tests with Trac 1.0 and later, also allow to run test by python test
13313 by jun66j5 on 2013-07-02 15:34:37
ticketimportplugin: prevent reporting that the description has changes when a comment is posted even if the ticket isn't changed.
12819 by jun66j5 on 2013-03-27 17:24:04
TicketImportPlugin: fixed fatal errors with a malformed csv file and improved handling such a file
12818 by jun66j5 on 2013-03-27 15:02:54
TicketImportPlugin: fixed failures of ImporterTestCase.test_celltypes_ticket_8804
11805 by farialima on 2012-07-27 17:18:03
test cases and workaround for #10188
11758 by farialima on 2012-07-23 13:22:44
Correctly handle case in relative fields
11755 by farialima on 2012-07-23 10:25:54
Added a test for import with ticket reference
11754 by farialima on 2012-07-23 09:55:41
Made all tests pass
11745 by farialima on 2012-07-20 18:07:57
Applied patch for #7812... not tested much, but it's not breaking anything :)
11744 by farialima on 2012-07-20 17:22:55
Fixed the tests so that they run on my machine. I hope they will run on other people's machines too :)
11514 by jun66j5 on 2012-04-25 03:54:28
Fixed unicode characters in id column when defaultencoding is ascii
11450 by jun66j5 on 2012-04-05 07:35:57
Fixed a problem acessing None with lack of the columns in a row


Author: farialima
Maintainer: farialima

Attachments (1)

Download all attachments as: .zip