getodk / getodk/central

Don't create/update entities when editing a finalized form in Collect

Open
#989 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
226
Forks
235
Avg merge
2d 22h
Merged PRs (30d)
19

Description

#### Problem description
After changes in Collect https://github.com/getodk/collect/pull/6698 editing a finalized (or sent) entity forms (even if the xml form contains odk:client-editable="true") shouldn’t update/change the entity.
If I create an entity locally in Collect (v1), then update the entity (v2) ,edit the finalized update form (v3 that shouldn’t exist) and send all forms, the entity in Collect is in v2 state (as expected) but sending all forms creates v3 on Central.
e.g. https://staging.getodk.cloud/projects/146/entity-lists/people/entities/205870c1-88da-4fb6-b5c5-f0765f0eb0e1
If in Collect the created entity is sent, update form is sent and edit finalized update form is sent then v3 isn’t created (in the submission detail page there isn't any information what happened. It looks like it updated some field but they're not connected with any entity).
#### URL of the page
https://staging.getodk.cloud/projects/146/entity-lists/people/entities
https://test.getodk.cloud/#/projects/616/entity-lists/people

#### Steps to reproduce the problem

Download apk from https://github.com/getodk/collect/pull/6698 (if it isn’t available, I’ll send it on Slack).

1. Download user "ent editable” (staging) or "ent” (test) to Collect.
2. In settings- form management set auto send to "off”.
3. Fill and finalize the registration form.
4. Go to the update form and update the created entity.
5. Go to "Ready to send” and open the update form, tap the pencil icon.
6. Edit the finalized form and finalize it.
7. Go to "Ready to send” and tap "Select all” and send the forms.
8. Check the entity in the update form in Collect.
9. Check the entity in Central.

#### Expected behavior
Editing finalized entity form shouldn't update entities.
#### Central version shown in version.txt
https://staging.getodk.cloud/
versions:
c9acb22a500c64b324174447492fe35b88c0ae0e (v2024.3.2-29-gc9acb22)
+9eacbf8bd5d02fcc1361aed40a2bf02d59ca9617 client (v2024.3.1-90-g9eacbf8b)
+0d881c12dbdc2bed3859128693e7d47aded1e406 server (v2024.3.1-83-g0d881c12)
https://test.getodk.cloud/
versions:
b5b06cb2c5b91aea1de60bc094a0354e5f82d2c1 (v2024.3.2)
8b1de6512faa7a60c05764312caec01f5c138c42 client (v2024.3.2)
7574030f7ea8750f3837950001a5efcdeba45b92 server (v2024.3.1)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.