wiki:TicketImportPlugin

Version 33 (modified by François Granade, 8 years ago) (diff)

--

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

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

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

Bugs/Feature Requests

This plugin has been tested extensively on Trac 0.11, and a little on Trac 0.10. Please report any issue !

Existing bugs and feature requests for TicketImportPlugin are here.

If you have any issues, create a new ticket.

Source

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

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:

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.

Change history for this plugin

17009 by jun66j5 on 2017-11-30 08:42:33
TicketImportPlugin: log trace back of the errors when unable to read an upload file
16997 by jun66j5 on 2017-11-21 02:56:52
TicketImportPlugin: use a stored value for formula when openpyxl is used (closes #13337)
16713 by jun66j5 on 2017-07-14 06:31:50
TicketImportPlugin: use new database api since Trac 1.0 (closes #13238)
16712 by jun66j5 on 2017-07-14 06:22:32
TicketImportPlugin: require Trac>=0.12,<1.3 and remove uses of Ticket.time_changed property
16709 by jun66j5 on 2017-07-13 07:19:13
TicketImportPlugin: use format_to_html rather than wiki_to_html
16708 by jun66j5 on 2017-07-13 06:57:06
TicketImportPlugin: avoid crash on termination of setup.py test with openpyxl
16707 by jun66j5 on 2017-07-13 06:55:21
TicketImportPlugin: follow-up to [16394], skip test cases with masterticketsplugin if no egg files
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
(more)

Author/Contributors

Author: farialima
Contributors:

Attachments (1)

Download all attachments as: .zip