-
Notifications
You must be signed in to change notification settings - Fork 217
Description
In entities-from-repeats, you could have a submission that creates multiple entities, but if any one of the entities has an error, the entire submission processing will stop and none of the entities will be created.
Entity creation can fail when the label is blank, so one scenario in which this comes up is when the entity label is based on a field, and that field is not filled in.
Sample form:
conditionalrepeatwithgeopointent.xml
Steps to recreate:
- Get form on Collect (with support for v2025.1 enabled)
- Go to conditional reapeat with geopoint entties form.
- In the first question select "yes"
- Fill "child's name" and following questions.
- Add another repeat but don't fill anything
- Send the form
- Check the list of entities
No entities are created
Submission activity feed mentions blank label and nothing else
XML of submission (with empty label field) looks like:
<?xml version="1.0"?>
<data xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:orx="http://openrosa.org/xforms" xmlns:entities="http://www.opendatakit.org/xforms/entities" xmlns:odk="http://www.opendatakit.org/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa" id="conditionalrepeatwithgeopointent" version="1">
<has_child>yes</has_child>
<child_repeat>
<nam>Bob</nam>
<birthweight>25.0</birthweight>
<geopoint/>
<meta>
<entity dataset="childRep" create="1" id="816af9fe-7b71-423d-b029-9141f70668d0">
<label>Bob</label>
</entity>
</meta>
</child_repeat>
<child_repeat>
<nam/>
<birthweight/>
<geopoint/>
<meta>
<entity dataset="childRep" create="1" id="2130e2b0-7288-476e-82ff-c4aa8c75a160">
<label/>
</entity>
</meta>
</child_repeat>
<meta>
<instanceID>uuid:c7b4f28e-e93d-48d1-acaa-3f918d60a812</instanceID>
</meta>
</data>
What do we want to happen? It's easier to reject everything in the submission (and have the chance to edit the submission to fix it?) than to take some of the entities and not the others.
Here's an example of editing that submission to fix the error:

Maybe the behavior is fine but there should be MORE information in an error message - like "2 entities detected, processed 1 of 2 before running into an error."
Metadata
Metadata
Assignees
Labels
Type
Projects
Status