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

Fix list names with special characters #6520

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Nov 20, 2024

Fixes this crash

Why is this the best possible solution? Were any other approaches considered?

I've just opted to quote the list names. I think a good follow up would be to use a safer mechanism to build SQL queries. Sadly, there's very little support for building complex queries with dynamic table/column names in the Android SDK itself, and I also haven't seen much in the way of third party libraries. We might have to roll our own solution.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?.

Should just allow list names with special characters (like favourite-films). It'd be good to do a full sweep of both dataset and property names to check that anything that can be created on Central is supported by Collect.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@seadowg seadowg added high priority Should be looked at before other PRs/issues needs testing labels Nov 20, 2024
@seadowg seadowg marked this pull request as ready for review November 20, 2024 10:31
@seadowg seadowg requested a review from grzesiek2010 November 20, 2024 10:31
@seadowg seadowg marked this pull request as draft November 20, 2024 11:21
@seadowg seadowg removed the request for review from grzesiek2010 November 20, 2024 11:21
@seadowg seadowg marked this pull request as ready for review November 20, 2024 14:31
@seadowg seadowg requested a review from grzesiek2010 November 20, 2024 14:31
@WKobus
Copy link

WKobus commented Nov 20, 2024

Tested with Success!

Verified on device with Android 15, 10

Verified cases:

  • Different combinations of special characters in entity lists name and properties
  • Upgrading from older version

@srujner
Copy link

srujner commented Nov 20, 2024

Tested with Success!

Verified on device with Android 14

@seadowg seadowg merged commit 1950fdf into getodk:master Nov 20, 2024
6 checks passed
@seadowg seadowg deleted the list-names branch November 20, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior verified high priority Should be looked at before other PRs/issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants