getodk / briefcase

ODK Briefcase is a Java application for fetching and pushing forms and their contents. It helps make billions of data points from ODK portable. Contribute and make the world a better place! ✨💼✨
https://docs.getodk.org/briefcase-intro
Other
60 stars 156 forks source link

Unable to export form pulled from directory if title has "illegal characters" #869

Open gt-novelt opened 4 years ago

gt-novelt commented 4 years ago

Software versions

Briefcase v1.17.4, openjdk 11.0.7 2020-04-14 OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1) OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)

Problem description

The export hangs forever when trying to export a form pulled from "Collect Directory" when form has "illegal characters".

Steps to reproduce the problem

Pull from a "Collect Directory" of a form that has illegal characters (for instance hyphens) as title and try to export it.

Expected behavior

Export succeed

Other information

I think this issue is caused by PR #803.

When pulling from directory, illegal characters of the form name are replace by '_'. https://github.com/getodk/briefcase/blob/52c86785b791594acaed41eb935e5685b59bb20d/src/org/opendatakit/aggregate/parser/BaseFormParserForJavaRosa.java#L520

But then when exporting, since JavaRosa is not used, those are not replaced. This leads to the form not being found on fetch: https://github.com/getodk/briefcase/blob/f7bc502850728af549d0ec0ad9a4fbb3160f706a/src/org/opendatakit/briefcase/ui/export/ExportPanel.java#L198

image

gt-novelt commented 4 years ago

800 appears to be related.

I don't think it is a duplicate since I believe the fix of #800 is what is causing the problem.