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 154 forks source link

Match case when finding xml elements #791

Closed ggalmazor closed 5 years ago

ggalmazor commented 5 years ago

Software versions

Briefcase v1.12

Problem description

When a form has two fields with the same name in different cases e.g. Field and field, it can get into problems when they don't share the same data type. In that case, we can't predict the matcher that will be used, which will produce errors when trying to transform incompatible raw values (as in, trying to parse a 2 as a datetime value will produce a parsing error).

Steps to reproduce the problem

Use the following form and try to export it: simple-form-case-sensitivity.zip

Expected behavior

The export should complete correctly having applied correct data transformations.

Other information

The XmlElement class introduced in v1.12 has two equalsIgnoreCase() calls that are responsible for this errors.