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

Form-builder allows invalid matrix question Data Column Suffix value #3326

Closed
joshuaberetta opened this issue Jun 30, 2021 · 1 comment · Fixed by #3328
Closed

Form-builder allows invalid matrix question Data Column Suffix value #3326

joshuaberetta opened this issue Jun 30, 2021 · 1 comment · Fixed by #3328
Assignees
Labels
bug Things broken and not working as expected formbuilder Mainly changes to our coffeescript part of KPI Front end has PR

Comments

@joshuaberetta
Copy link
Member

Description

The Data Column Suffix field in the matrix question settings does not replace spaces with underscores as it does with other question names, therefore leaving it open to user error and incomplete data exports, such as in this case: https://community.kobotoolbox.org/t/missing-data-on-export-yet-its-there-in-the-tool-its-a-group-question/20130

The Enketo preview gives this error:

[row : 6] Invalid question name [group_hl59k79_header_a space] Names must begin with a letter, colon, or underscore.Subsequent characters can include numbers, dashes, and periods.

Strangely the form opens and one can submit without error. When one tries to export with KPI, the data in the matrix is not included because of this now invalid name (fortunately the legacy export includes the data).

Steps to Reproduce

  1. Create a matrix question
  2. Enter a value with spaces in the Data Column Suffix field
  3. Try previewing the form
  4. Submit data
  5. Try exporting through KPI

Expected behavior

The spaces are replaced to create a valid field value.

Actual behavior

Invalid values are allowed through.

@joshuaberetta joshuaberetta added bug Things broken and not working as expected formbuilder Mainly changes to our coffeescript part of KPI Front end labels Jun 30, 2021
@magicznyleszek magicznyleszek self-assigned this Jul 1, 2021
@joshuaberetta joshuaberetta linked a pull request Jul 1, 2021 that will close this issue
@jnm
Copy link
Member

jnm commented Jul 1, 2021

Let's make sure we don't close this until we understand why there's a discrepancy between

  • what's deployed to KoBoCAT and what KPI serves up when downloading the XLSForm, and
  • what's used when exports are attempted

Internal discussion: https://chat.kobotoolbox.org/#narrow/stream/6-Support/topic/form-builder.20issues/near/41915

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things broken and not working as expected formbuilder Mainly changes to our coffeescript part of KPI Front end has PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants