Project Import AO Entity Handler String Encoding issue

I have come across an issue while working on project import. We have Active Object tables which we want exported/imported in Jira. We noticed that our String fields are not properly decoded from the backup, resulting in importing a different string value than what was exported.

Jira uses StaxUtils.encode to encode the AO tables in the StaxStreamWriter, when building the backup file. (activeobjects-plugin library)

But during Project import, Jira uses XMLEscapeUtil.decode in the ChainedAoSaxHandler which doesn’t decode using the same process. (jira-core)

This discrepancy results in, for instance, backslashes \ inside a string column to be imported back as two backslashes \\.

Any help understanding if this is an oversight and what should be done is appreciated. I am reluctant to replace the string manually myself, as Atlassian should fix the issue.

1 Like

This may also be the root cause of why https://confluence.atlassian.com/jira/removing-invalid-characters-from-xml-backups-12079.html is a common issue.