ushahidi / Ushahidi_Web

Ushahidi v2. A platform that allows information collection, visualization and interactive mapping, allowing anyone to submit information through text messaging using a mobile phone, email or web form.
http://www.ushahidi.com
Other
896 stars 624 forks source link

CSV Import breaks on custom form fields. #1435

Open aoduor opened 9 years ago

aoduor commented 9 years ago

Tested this on a separate custom build, and on the most stable version of Ushahidi, and get the following error on upload

Error!

Could not parse incident date on report # 2: Type de violence 3-1

Any help on this would be great. Urgent fix required for client.

aoduor commented 9 years ago

Spoke to @rjmackay and @bodacea who shed some bit of light on this.

  1. Microsoft excel for mac doesn’t support arabic characters as of yet, and this is something entirely out of our control
  2. Noticed that somehow, excel gets rid of the quotes on headers in CSV files. While in cases where there are no custom form fields, upload works, when users chose to download/upload custom form field responses, this causes havoc(given that the the way we structured custom form fields in the CSV file is $field_name - $form_id i.e Sample Custom Field - 1).

I’ve tested editing/creating a CSV file using Open Office, and during the creation/import process, make sure to select “Quoted field as text”, and the upload works. Quick solution for this atm is to recommend NOT using MS Excel, and to use OpenOffice, but we need to find a long term solution/fix for this.