how can I migrate issues from redmine to tuleap

1.5k views Asked by At

Originally we use Redmine as issue management system, now we are planning to migrate to Tuleap system.

Both system have features to import/export issues into .csv file.

I want to know whether there is standard / simple way to migrate issues.

The main items inside issues are status, title and description.

3

There are 3 answers

0
Larry Cai On BEST ANSWER

Since both system can export the csv file, which contains the item header that they needed, some header is different.

It needs scripts to map from one system to another system, code snippet is shown below.

It can work for other ALM system if they don't support from application (I mean migration).

#!/usr/bin/env python
import csv
import sys

# read sample tuleap csv header to avoid some field changes
tuleapcsvfile = open('tuleap.csv', 'rb')
reader = csv.DictReader(tuleapcsvfile)
to_del = ["remaining_effort","cross_references"]
# remove unneeded items
issueheader = [i for i in reader.fieldnames if not i in to_del]

# open stdout for output
w = csv.DictWriter(sys.stdout, fieldnames=issueheader,lineterminator="\n")
w.writeheader()

# read redmine csv files for converting
redminecsvfile = open('redmine.csv', 'rb')
redminereader = csv.DictReader(redminecsvfile)
for row in redminereader:
    newrow = {}
    if row['Status']=='New':
        newrow['status'] = "Not Started"
    # some simple one to one mapping
    newrow['i_want_to' ]= row['Subject']
    newrow['so_that'] = row['Description']
    w.writerow(newrow)

some items in exported csv can't be imported back in tuleap like remaining_effort,cross_references.

These two items are shown inside exported .csv file from tuleap issues.

2
Manuel VACELET On

What are "remaining_effort" and "cross_references" kind of data in remind ?

0
jpo38 On

Had the same issue and the csv solution looked too limited to me:

  • the field matching between tracker and csv content must fit exactly
  • you can't import attachments
  • you can't link artifacts
  • ...

Issues can be extracted from Redmine using REST API or by directly reading the SQL database. Artifacts can be created in Tuleap using the REST API. You "just" need a script in the middle to extract issues from Redmine and then import them into Tuleap.

I created such a script in Python:

  • It has a plugin approach so that it could import issues/bugs from any bug tracker and later save them to any other bug tracker.
  • For now it only support extracting issues from Redmine SQL database and export to Tuleap using REST API.
  • One can extend it (new plugin) to extract issues from other trackers (bugzilla/mantis/gitlab).
  • One can extend it (new plugin) to generate a Tuleap xml file rather than importing the artifacts using Tuleap REST API (XML being more powerful here).

I ported hundreds of issues from Redmine to Tuleap using this and it was good enough for my needs.

Have a look at https://github.com/jpo38/TrackerIO.