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

Local entity create #5923

Closed
6 tasks done
seadowg opened this issue Jan 18, 2024 · 1 comment · Fixed by #5982
Closed
6 tasks done

Local entity create #5923

seadowg opened this issue Jan 18, 2024 · 1 comment · Fixed by #5982
Assignees
Milestone

Comments

@seadowg
Copy link
Member

seadowg commented Jan 18, 2024

  • Entities created in local registration form are available in local follow up form without submitting
  • If an entity exists both locally and on the server (an entity with matching UUID exists both locally and in the form's secondary instance entity list), the local one should be used (displayed in follow up/update forms and the entity browser)
  • All entity properties should be available to follow up forms
  • Local entity creation should be disable-able from Experimental
  • Local entities should still exist after killing the app and restarting
  • Account for form caching

Notes

One way to implement this would be to rework the FilterStrategy API so that the children being filtered (a List of TreeReference) can be passed down between strategies. This would mean that Collect could add a strategy that either "expands" the secondary instance with items in the EntitiesRepository, or just wholesale converts the EntitiesRepository items to TreeReference items (with some earlier preprocessing to add the secondary instance items in). This approach would not do anything to help the memory footprint of select queries (like that detailed at #5623) directly, but it would add infrastructure for Collect to "intercept" how secondary instance children are loaded which could probably be expanded on later. It might be that passing the children "lazily" (as a Supplier<List<TreeReference>> for example) would be enough for the optimisation work in #5623 to be carried out without modifying JavaRosa - Collect could add a filter strategy that queries against a DB instead of actually using the passed (lazy) children.

If this does end up using FilterStrategy, it'll be important to check that the chain is always used (even when there are no predicates for instance).

@seadowg seadowg converted this from a draft issue Jan 18, 2024
@seadowg seadowg added this to the v2024.2 milestone Jan 18, 2024
@seadowg seadowg changed the title Entities created in local registration form are available in local follow up form without submitting Local entity create Jan 18, 2024
@seadowg
Copy link
Member Author

seadowg commented Feb 15, 2024

@lognaturel could you attach example forms for this and #5924?

@seadowg seadowg moved this from not ready to ready in ODK Collect Feb 21, 2024
@seadowg seadowg self-assigned this Feb 21, 2024
@seadowg seadowg moved this from ready to in progress in ODK Collect Feb 21, 2024
@github-project-automation github-project-automation bot moved this from in progress to done in ODK Collect Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging a pull request may close this issue.

1 participant