onaio / onadata

Collect, Analyze and Share
https://ona.io
Other
182 stars 131 forks source link

Select multiples within repeating sections not flattened during CSV import #2581

Closed kelvin-muchiri closed 2 months ago

kelvin-muchiri commented 2 months ago

Environmental Information

Problem description

When importing a CSV that has select multiples within a repeating section split, the split select multiples are not flattened and the resulting XML file has the multiples split

Expected behavior

Split select multiples within a repeating section should be flattened during a CSV import

Steps to reproduce the behavior

  1. Create a form that has select multiples within a repeating section.
  2. Make submissions to the form
  3. Export the submissions into a CSV with the select multiples split and edit the submissions.
  4. Import the CSV edited in the previous step
  5. Export the submissions into a CSV without the select multiples split. A select multiple question within a repeating section that previously had values will now have a value of n/a
  6. Visiting the endpoint https://api.ona.io/api/v1/data/<form_id>, you will notice that the select multiple question has the values split. See screenshot below Screenshot from 2024-04-09 10-36-06

Additional Information

Sample form and CSV multiples-group-repeat.xlsx csv_import_multiple_split_group_repeat.csv

faith-mutua commented 2 months ago

@kelvin-muchiri this issue is now resolved on stage.ona.io