getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
719 stars 1.38k forks source link

Entity with missing label #6453

Closed dbemke closed 1 month ago

dbemke commented 1 month ago

ODK Collect version

the store version 2024.2.4, the master version 63050fdd265c42f3c340f0ada5cdff3c52a883bc

Android version

10, 14

Device used

Redmi 9T, Pixel 7a

Problem description

 If I create (offline) and send an entity with empty values, the entity appears in update/follow-up forms in the device. In Central the entity won’t get created because of the missing values in label.   emptyLabel

Steps to reproduce the problem

  1. Scan the QR user "movies” https://staging.getodk.cloud/#/projects/101/app-users
  2. Go to Movie entities form, don’t fill anything, send the form.
  3. Refresh the list to f blank forms.
  4. Go to Movies update form and check the list of entities.
  5. Check the state of the entity on Central.
seadowg commented 1 month ago

@lognaturel I'm not sure I agree that the spec states that an entity must have a label? My reading is that a form must have a label node, but not that it has to be non blank.

lognaturel commented 1 month ago

The intent is for it to be required to be non-blank! We can clarify the spec language.

I do think that Collect should fail to create the Entity as well for consistency. This is the kind of failure that would be nice to log one day and maybe even present some UI around but I think that for now failing silently would be fine. I also think it's not a huge deal if we leave it like this for a release or two -- it's unlikely to be a common case. Once we introduce the integrity URL piece any extra local Entities will be cleared out.