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

Add an element in the mediaFile block for Entity Lists in the OpenRosa manifest to specify a URL to get Entity information #668

Open
5 tasks
lognaturel opened this issue May 15, 2024 · 4 comments
Assignees
Labels
backend Requires a change to the API server enhancement New feature or behavior entities Multiple Encounter workflows

Comments

@lognaturel
Copy link
Member

lognaturel commented May 15, 2024

As the implementer of a data collection client, if there are Entities in the client's representation that are not included in the server response
I want to be able to request the status of those specific Entities
So that I can delete any Entities that no longer exist on the server

As the implementer of a data collection client
I want to be able to get information about specific Entities
So that I can make sure their state is up to date in my local representation

See Collect issue getodk/collect#6231 describing desired XML API.

Strawman proposal

Interesting cases to design for

Deleted and purged Entities

Currently purged Submissions are completely removed so it's possible to reuse an id. Entity purge is not yet implemented. We'll need to decide whether to keep historic UUIDs or allow reuse. Allowing reuse would only be an issue in very rare cases.

Let's not allow reuse of UUIDs when Entities are soft-deleted to avoid the case where Entities with the same UUID are in trash and active.

Rejected submissions that never resulted in Entity creation

Two concepts have emerged so far: send the instanceID to the integrity API to detect this case or keep a notion of "phantom" entities that wanted to be created but never were.

Todo

  • Implement strawman
  • Use in Collect
  • Consider max URL size and whether query parameters are appropriate
  • Consider naming of deleted element so the name matches what it represents (true: server knows of the Entity and it shouldn't be on that client; false: server either doesn't know of the Entity or it knows it and it should stay on the client)
  • Post on forum and iterate on element names + response structure

CC @seadowg

@lognaturel lognaturel added the enhancement New feature or behavior label May 15, 2024
@matthew-white matthew-white added backend Requires a change to the API server entities Multiple Encounter workflows labels May 17, 2024
@seadowg

This comment was marked as resolved.

@lognaturel

This comment was marked as resolved.

@matthew-white

This comment was marked as resolved.

@matthew-white
Copy link
Member

  • For v2024.2, the main case we need to address is soft-deleted entities, which are still present in the database and easy to look up in the entities table.
  • Once we support purging entities, we'll need a way to track the UUIDs of entities that have been purged.
  • We may also implement something related to submission approval, but probably not until a later release (see Tell clients to delete entities when their submissions have not been approved #685).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Requires a change to the API server enhancement New feature or behavior entities Multiple Encounter workflows
Projects
Status: 🕒 backlog
Development

No branches or pull requests

4 participants