Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulldata fails silently when csv file has spaces in the name #4924

Open
amschel-de-r opened this issue Apr 30, 2024 · 0 comments
Open

Pulldata fails silently when csv file has spaces in the name #4924

amschel-de-r opened this issue Apr 30, 2024 · 0 comments

Comments

@amschel-de-r
Copy link

Description

  • When attaching a CSV file in Media, there is no block on the csv having spaces in the name
  • When adding a 'pulldata' calculation, there is no error message or warning when the pulldata references a csv file with spaces in the name
  • When the form is then opened in Enketo, the form fails to fetch any data using the pulldata calculation. When inspecting in the browser, an error is raised from instance('form name with spaces')/root/data..., but this is not shown to the user

Steps to Reproduce

  1. Create generic questionnaire/form
  2. Attach CSV file in media, where the file name contains spaces
  3. Add a calculate question to the questionnaire, using the pulldata formula, referencing the CSV file with spaces
  4. Add another question to show if the calculate question is working (e.g. a note question where the label references the output of the calculate question)
  5. Deploy
  6. Open in Enketo and fill out

Expected behavior

Either

  • Form is able to pull from CSV file, and displays pulled value
  • Kobo raises a warning when CSV file with spaces in name is uploaded
  • Kobo raises a warning when questionnaire is deployed that tries to use pulldata referring to a file with spaces in the name
  • Enketo raises an error when trying to complete the form

Actual behavior

  • CSV upload is allowed
  • No warnings raised on deployment
  • No error displayed in Enketo (without browser inspection)
  • Pulldata calculate field does not work

Additional details

I have noted this issues for spaces in the file name. It may be true for other disallowed characters as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant