I am migrating issues from an old bug tracking system to JIRA using the CSV import feature. I have exported the main issues table to a CSV file, but there are related tables that have a one-to-many relationship with the issues, for example, audit trail of incident updates, as well as attachments for each issue.
I see how to import the issues, but not how to import related records -- possibly multiples -- for each issue. Is there a way to preserve the related data in the migration?
@Renjith, actually we support importing issue history now.
@AnonyMe - so to preserve one-to-many relationships in CSV file you use just multiple columns for the same item, like you can have multiple columns named Comment and they will be automatically combined, the same goes for other items like Attachment, Label, etc.
Building such a complex file might be tricky so I suppose you would want to make a script that will dump the original database to it - so you can easily iterate with your work.
Also if you want to have a more structured file (and more control over CSV) you can try using our JSON (beta) format. But this is an advanced technique. Here's some documentation https://confluence.atlassian.com/pages/viewpage.action?pageId=293830712
@Pawel - thanks for the advice, although I am still confused. Each issue that I am migrating can have zero or more updates, so how do I account for this variable number of updates per issue by adding columns to my CSV file?
I will look into the article on using JSON, but I could also do a direct migration from one database to the other, either through updatable views or through export/import since both the source and the target databases are SQL Server (albeit different versions). Is there anything I need to be mindful of once I familiarize myself with the JIRA structure, like triggers, etc.?
I found the latest data schema documentation on your website, athough I have to say it is very hard to read and seems not very printer-friendly.
Thanks again for your help!
To create a propert CSV file in this case you'd have to create a script that would keep all records in history and then check what's the biggest numer of changes, attachments, comments, etc. and create so many columns for them. In case of issues having less items columns can be empty.
I guess using JSON in this case would be more intuitive for your - as each object is really well structured and can contain different details than others.
I know that some customers do copy data directly to JIRA database. I'm not an expert on that. The one thing to remember is to update all sequences correctly. I've created a Trac to JIRA importer using database directly couple of years ago, I know it's doable, but required couple of days to figure out all issues. I think JIRA Data Generator source code may give you some hints about iternal db structure. But I might be wrong.
Issue history import is not supported using CSV, AFAIK. While attachments can be done as documented at https://confluence.atlassian.com/display/JIRA/Importing+Data+from+CSV#ImportingDatafromCSV-Importingattachments
You can import historical data by using JSON importer (beta) - part of JIRA Importers Plugin bundled with JIRA. But that will require some data pre-processing (into JSON format understood by the importer) on your side.
If you want just to stick to CSV import, then you can play with issue update capaiblity offered by it. I.e. if you denote one of your columns in CSV as the issue key (which has to match an issue key already in JIRA), then you can effectively update an existing issue and thus import changes to its status, field values or e.g. import more worklog information.
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG