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, from an Excel file if the xlrd library is installed.

You can also use it to modify tickets in batch, by saving a report as CSV, editing the CSV file, and re-importing the file.

This plugin is very useful when starting a new project: you can import a list of requirements that may have come from meeting notes, a list of features, other ticketing systems, etc. It is also great to review the tickets off-line, or to perform changes to tickets in bulk.

Based on the ticket id (or, if no id exists, on the summary) in the imported file, tickets are either created or updated.

References to other tickets, such as the ones used in MasterTicketsPlugin, should be handled correctly, at least for the initial import.

Once you have enabled the plugin and given yourself the 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 what you will be importing and lets you confirm the import.

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.

It is used by software products development teams daily on several projects in at least three companies.

See also: ExportImportXlsPlugin

Bugs/Feature requests

There are very few known issues, please report any problem you encounter.

In general, it's better to use Excel than CSV, as CSV files have limitations, character sets in particular.

This plugin is not designed to help you migrate tickets from one system to another: it cannot keep the ticket numbers when creating new tickets, nor does it keep the history for existing tickets. See #4783 and #5504 for details.

Finally, this plugin is maintained for Trac 0.11 and above: the 0.10 builds are known to work, but do not have the latest features (importing comments, in particular).


34 / 39


9 / 15


2 / 2


Download the zipped source from here.


You can check out TicketImportPlugin from here using Subversion, or browse the source with Trac.

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:

Trac version Command
1.0+ easy_install
0.11, 0.12 easy_install
0.10 easy_install

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 1.0 or later
    • svn co ticketimportplugin for Trac 0.11 or 0.12
    • svn co ticketimportplugin for Trac 0.10
  • 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, the Python library xlrd must be installed. On Windows, run the installer; on other platforms, just unzip the .zip file, and copy the "xlrd" folder that it contains into the "site-packages" folder of the Python lib. Example:

easy_install xlrd

To verify that it is correctly installed, run python -c 'import xlrd' from the command line: it should not generate 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 in your trac.ini file:

talm_importer.importer.* = enabled

This file can be found under the "conf" directory of your Trac instance.

Then, you need to give some user(s) the right to use the Import module. To do that, you must give them the 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 dates or date times, you can customize the format that will be used to import them:

datetime_format = ....

The format is the Python fstrtime.

Recent changes

18621 by jun66j5 on 2024-02-22 01:51:31
TicketImportPlugin: pass logging format and parameters rather than formatted string
18620 by jun66j5 on 2024-02-21 14:18:25
TicketImportPlugin: follow-up to r18418, fix compatible with Trac 1.6
18419 by jun66j5 on 2021-06-01 16:37:25
TicketImportPlugin: remove print for dumb debugging


Author: farialima
Maintainer: François Granade, jun66j5

Last modified 7 years ago Last modified on Aug 16, 2017, 3:40:29 PM

Attachments (1)

Download all attachments as: .zip