I recently upgraded our instance of JIRA from a very old 3 to a newish 4.1. We migrated to new hardware, new operating system, new database type and new database encoding at the same time. What made things interesting was that the original database wasn’t UTF-8 (it was Cp1252) so when we imported the JIRA export into the new system, it crashed spectacularly.
I tried to clean up some of the bad characters I found in the issues, but (un)fortunately, JIRA keeps copies of every change. So if you have an issue description with bad characters in it, then edit it and save, the old one is tucked away safely and can’t be edited. So I was doomed and had to manually process the export XML before importing it into the new system.
And the steps:
- Unzip the JIRA export
- Manually search and replace beta’s (ß)
- Run the groovy script: groovy fixXml export.xml export-fixed.xml
- Verify via xmllint: xmllint export-fixed.xml
You’ll need to have Groovy installed.