Refrences lost after Trac to JIRA migration

Taj Pelc February 21, 2013

We are trying to migrate to JIRA from Trac and plan on using it in combination with GreenHopper for scrum. We are using the built in Trac import plugin.

In Trac we have requirements which are equivalent to epics in JIRA and reference multiple stories that need to be carried out in a sprint.

In the new setup we would use epics to group stories together and add sub-tasks to stories.

When importing from trac, the issue types are remaped as such:

requirement => epic
story => story
task => task
bug => bug

After the import the references between Trac items are not recreated in JIRA.

Is there a way to preserve refrences or alternatively a script or a tool to automate the creation of refrences. Manually creating them is not an option, because there are over 5000 issues and we would like to keep all of them to save history.

6 answers

1 accepted

0 votes
Answer accepted
Taj Pelc March 13, 2013

You have to do some scripting in order to rewire everything after the import if you want to retain the same structure. This is the flow that I followed:

  1. Import the trac project with the built in jira importer and remap the fields as desired (Epics, Stories, Tasks, Bugs)
  2. Get a list of all the issues from jira and trac and build a map (jira_id => trac_id), jira stores the old id in a custom field named "external issue id"
  3. Build a mapping of issue links from agilo database table "agilo_link" in trac
  4. Use the REST API to add stories to epics (/rest/greenhopper/1.0/epics/$EPIC_ID/add)
  5. Use the REST API to rename epics (/rest/greenhopper/1.0/xboard/issue/update-field.json)
  6. Use selenium to convert tasks to sub-tasks with stories for parent issues

Check with the documentation for a detail how to of the REST API. The steps should be fairly easy if you have a programming background.

0 votes
Iván Párraga March 10, 2013

Hi Taj,

I'm experiencing the same problem as I need to import a Trac installation with Agilo plugin. Did you manage to import these reference fields?

Cheers,

Iván

Taj Pelc March 13, 2013

This is a question, not an answer :). Check below for my solution.

0 votes
Immanuel Siagian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2013

Thanks for this piece of information Taj. To be quite honest, I am not familiar the Agilo Trac Plugin, but do let us know if there's anything we can do to assist you.

Cheers.

0 votes
Immanuel Siagian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2013

Thanks for this piece of information Taj. To be quite honest, I am not familiar the Agilo Trac Plugin, but do let us know if there's anything we can do to assist you.

Cheers.

0 votes
Taj Pelc February 25, 2013

I think I know where the problem is. The references are kept by an addon for trac, Agilo for Trac 0.9.8 with Trac Version 1 in a table agilo_link. I believe I will have to replicate the references manually with a CLI script after the import.

0 votes
Immanuel Siagian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2013

Hi Taj,

Would you mind provide us the Trac Version? I will try to import from Trac and see whether this behaviour is replicable. Thanks

Suggest an answer

Log in or Sign up to answer