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

12624: xlsform export: fix duplicate column header error in Central #1032

Merged
merged 3 commits into from
Jan 22, 2025

Conversation

plastichotsprings
Copy link
Collaborator

if a form references 2 different option sets, and the option sets have a duplicate level name, ODK Central will fail to upload the generated XLSForm with the error: the XLSForm could not be converted: Duplicate column header

To fix this, we prepend the option set name (which is unique in NEMO) to the level name whenever it's referenced in the XLSForm.

Copy link
Member

@cooperka cooperka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice and straightforward. thanks for mentioning that the os_name is guaranteed unique.

tested and verified in ODK Central! while testing i did have to add the allow_choice_duplicates setting to allow big cascading selects, e.g. where "Main St" might be a street that exists simultaneously in multiple unique cities.

i also created unique_level_name so there's only 1 method that generates these level names since it's being done 3 times. wouldn't want to later make a tweak that changes 2/3 and forget the third.

@cooperka cooperka merged commit 14c3ef3 into main Jan 22, 2025
1 check failed
@cooperka cooperka changed the title 12624: xlsform export bug fix: duplicate column header error 12624: xlsform export: fix duplicate column header error in Central Jan 22, 2025
Copy link

sentry-io bot commented Jan 24, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ **NameError: undefined local variable or method constraint_message_to_push' for an instance of Forms::Export ...** FormsController#export_xls` View Issue

Did you find this useful? React with a 👍 or 👎

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

Successfully merging this pull request may close these issues.

2 participants