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

Do not create entities with blank labels #6527

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Nov 21, 2024

Closes #6518

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

There isn't much to discuss here. Instead of blocking the creation of empty labels, we now block blank labels as well.

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?

It should just fix the issue described in #6518. I don't think it can affect anything else.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

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

@grzesiek2010 grzesiek2010 marked this pull request as ready for review November 21, 2024 20:29
@grzesiek2010 grzesiek2010 requested a review from seadowg November 21, 2024 20:29
@seadowg seadowg merged commit 26f6a5b into getodk:master Nov 22, 2024
6 checks passed
@dbemke
Copy link

dbemke commented Nov 25, 2024

Should label concat(${circumference} ${species}) (it's trees registration form) be treated as blank label? Both Collect and Central treat it as "missing label"
trees_registration(5).xlsx.txt
https://staging.getodk.cloud/#/projects/101

@lognaturel
Copy link
Member

If the label expression is concat(${circumference}, ${species}) and neither field is given a value, I would expect the label to be entirely missing because the expression would evaluate to "". That would be different from concat(${circumference}, " ", ${species}) which would result in a label of " ".

@seadowg seadowg added the high priority Should be looked at before other PRs/issues label Nov 27, 2024
@dbemke
Copy link

dbemke commented Nov 27, 2024

Tested with Success!

Verified on devices with Androids: 10 , 15 (by Wiktor)

Verified cases:

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.

Local entities with only a space in the label
4 participants