ˆà | 1 | = Importing ticket data =ˆà |
ˆà | 2 | ˆà |
ˆà | 3 | == Bugzilla ==ˆà |
ˆà | 4 | ˆà |
ˆà | 5 | Ticket data can be imported from Bugzilla using the [http://trac.edgewall.org/browser/trunk/contrib/bugzilla2trac.py bugzilla2trac.py] script, available in the contrib/ directory of the Trac distribution.ˆà |
ˆà | 6 | ˆà |
ˆà | 7 | {{{ˆà |
ˆà | 8 | $ bugzilla2trac.pyˆà |
ˆà | 9 | bugzilla2trac - Imports a bug database from Bugzilla into Trac.ˆà |
ˆà | 10 | ˆà |
ˆà | 11 | Usage: bugzilla2trac.py [options]ˆà |
ˆà | 12 | ˆà |
ˆà | 13 | Available Options:ˆà |
ˆà | 14 | --db <MySQL dbname> - Bugzilla's databaseˆà |
ˆà | 15 | --tracenv /path/to/trac/env - full path to Trac db environmentˆà |
ˆà | 16 | -h | --host <MySQL hostname> - Bugzilla's DNS host nameˆà |
ˆà | 17 | -u | --user <MySQL username> - effective Bugzilla's database userˆà |
ˆà | 18 | -p | --passwd <MySQL password> - Bugzilla's user passwordˆà |
ˆà | 19 | -c | --clean - remove current Trac tickets before importingˆà |
ˆà | 20 | --help | help - this help infoˆà |
ˆà | 21 | ˆà |
ˆà | 22 | Additional configuration options can be defined directly in the script.ˆà |
ˆà | 23 | }}}ˆà |
ˆà | 24 | ˆà |
ˆà | 25 | Currently, the following data is imported from Bugzilla:ˆà |
ˆà | 26 | ˆà |
ˆà | 27 | * bugsˆà |
ˆà | 28 | * bug activity (field changes)ˆà |
ˆà | 29 | * bug attachmentsˆà |
ˆà | 30 | * user names and passwords (put into a htpasswd file)ˆà |
ˆà | 31 | ˆà |
ˆà | 32 | The script provides a number of features to ease the conversion, such as:ˆà |
ˆà | 33 | ˆà |
ˆà | 34 | * PRODUCT_KEYWORDS: Trac doesn't have the concept of products, so the script provides the ability to attach a ticket keyword instead.ˆà |
ˆà | 35 | ˆà |
ˆà | 36 | * IGNORE_COMMENTS: Don't import Bugzilla comments that match a certain regexp.ˆà |
ˆà | 37 | ˆà |
ˆà | 38 | * STATUS_KEYWORDS: Attach ticket keywords for the Bugzilla statuses not available in Trac. By default, the 'VERIFIED' and 'RELEASED' Bugzilla statuses are translated into Trac keywords.ˆà |
ˆà | 39 | ˆà |
ˆà | 40 | For more details on the available options, see the configuration section at the top of the script.ˆà |
ˆà | 41 | ˆà |
ˆà | 42 | == Sourceforge ==ˆà |
ˆà | 43 | ˆà |
ˆà | 44 | Ticket data can be imported from Sourceforge using the [http://trac.edgewall.org/browser/trunk/contrib/sourceforge2trac.py sourceforge2trac.py] script, available in the contrib/ directory of the Trac distribution.ˆà |
ˆà | 45 | ˆà |
ˆà | 46 | == Mantis ==ˆà |
ˆà | 47 | ˆà |
ˆà | 48 | NB! The mantis2trac script now lives at http://trac-hacks.org/wiki/MantisImportScript . You can always get the latest version from http://trac-hacks.org/changeset/latest/mantisimportscript?old_path=/&filename=mantisimportscript&format=zipˆà |
ˆà | 49 | ˆà |
ˆà | 50 | Mantis bugs can be imported using the attached script.ˆà |
ˆà | 51 | ˆà |
ˆà | 52 | Currently, the following data is imported from Mantis:ˆà |
ˆà | 53 | * bugsˆà |
ˆà | 54 | * bug commentsˆà |
ˆà | 55 | * bug activity (field changes)ˆà |
ˆà | 56 | * attachments (as long as the files live in the mantis db, not on the filesystem) ˆà |
ˆà | 57 | ˆà |
ˆà | 58 | If you use the script, please read the NOTES section (at the top of the file) and make sure you adjust the config parameters for your environment.ˆà |
ˆà | 59 | ˆà |
ˆà | 60 | mantis2trac.py has the same parameters as the bugzilla2trac.py script:ˆà |
ˆà | 61 | {{{ˆà |
ˆà | 62 | mantis2trac - Imports a bug database from Mantis into Trac.ˆà |
ˆà | 63 | ˆà |
ˆà | 64 | Usage: mantis2trac.py [options] ˆà |
ˆà | 65 | ˆà |
ˆà | 66 | Available Options:ˆà |
ˆà | 67 | --db <MySQL dbname> - Mantis databaseˆà |
ˆà | 68 | --tracenv /path/to/trac/env - Full path to Trac db environmentˆà |
ˆà | 69 | -h | --host <MySQL hostname> - Mantis DNS host nameˆà |
ˆà | 70 | -u | --user <MySQL username> - Effective Mantis database userˆà |
ˆà | 71 | -p | --passwd <MySQL password> - Mantis database user passwordˆà |
ˆà | 72 | -c | --clean - Remove current Trac tickets before importingˆà |
ˆà | 73 | --help | help - This help infoˆà |
ˆà | 74 | ˆà |
ˆà | 75 | Additional configuration options can be defined directly in the script.ˆà |
ˆà | 76 | }}} ˆà |
ˆà | 77 | ˆà |
ˆà | 78 | == Other ==ˆà |
ˆà | 79 | ˆà |
ˆà | 80 | Since trac uses a SQL database to store the data, you can import from other systems by examining the database tables. Just go into [http://www.sqlite.org/sqlite.html sqlite] command line to look at the tables and import into them from your application.ˆà |
ˆà | 81 | ˆà |
ˆà | 82 | === Using a comma delimited file - CSV ===ˆà |
ˆà | 83 | See [http://trac.edgewall.org/attachment/wiki/TracSynchronize/csv2trac.2.py] for details. This approach is particularly useful if one needs to enter a large number of tickets by hand. (note that the ticket type type field, (task etc...) is also needed for this script to work with more recent Trac releases)ˆà |
ˆà | 84 | ˆà |