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 is a common issue.

If there’s anybody from Atlassian looking at this post, you should create an internal bug. AFAIK it’s a bug in how you encode AO and decode it when importing back. I don’t think I can / should do anything about this myself.

1 Like