Forms using Entities aren't updated after entity is deleted via API endpoint

1. What is the issue? Please be detailed.

I'm using Central v2023.5.0 with Collect v2024.1

I'm using entities across multiple forms.

I recently deleted 2 entities via the API endpoint /projects/{projectId}/datasets/{name}/entities/{uuid}

I then did a refresh within Collect a few minutes later and those same entities were still within the entity list.

I then checked the same forms using this entity list the next day and the deleted entities were still within the list after an attempted project form update (with no errors).
I completed a new form submission to create a new entity and the associated forms using this entity list were updated and said entities were actually deleted.

Forms using an entity list need to be updated after entity deletion.

2. What steps can we take to reproduce this issue?
Use a form to create 1 or more entities and then delete them via the API endpoint
/projects/{projectId}/datasets/{name}/entities/{uuid}

Check Collect without submitting any forms after entity deletion and refresh/update your forms.
Those forms that use the entity list are not updated with the new entity list from the server that have had entities deleted.

3. What have you tried to fix the issue?
The only thing to trigger a form update with the current/correct entity list is to use another form that updates or creates a new entity.
I understand this functionality as you don't want to update each linked form after every entity deletion as this could lead to thousands of updates.
Perhaps this needs some sort of time delayed function to update linked forms that resets if the deletion endpoint is called before execution.

4. Upload any forms or screenshots you can share publicly below.

So sorry, it's a bug. We have a fix and are working on getting everything integrated and tested for a release within the next two weeks.

1 Like

Thanks LN, no worries I just want to make sure it was known :slight_smile: .

Cheers,
Ben

2 Likes

Thank you @LN for the quick fix in the last 2024 version of Central! I will upgrade my instance and test it.

1 Like