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

Handle conflicts if the datapackage has been modified on the server #5

Open
cpina opened this issue Oct 27, 2020 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@cpina
Copy link
Collaborator

cpina commented Oct 27, 2020

Currently users are not warned if their changes are going to overwrite changes from another user.

Steps to reproduce:

  • Collaborator1 (or datamanager) starts editing a datapackage
  • Collaborator2 starts editing the same datapackage
  • Collaborator1 makes some changes and save
  • Collaborator2 makes some changes and save

The datapackage in the server is from Collaborator2. The changes made by Collaborator1 are lost.

Possible solutions:

  • Avoid two people editing the same datapackage at the same time. When Collaborator1 opens the datapackage on the "load" the server could track that this datapackage was opened and could avoid anyone else opening for the next X minutes. If Collaborator1 hasn't finished in X minutes: a notification in Collaborato1 datacreator would appear asking "are you still editing?" (like banking applications / Youtube / ...)
  • When the datapackage is saved: Django side could try to do a JSON merge (e.g. https://pythonhosted.org/json-merger/). If it can be merged then proceed, if not ask the user to resolve conflicts (this is still dangerous because there might not be "physical" conflicts but might be "logical" conflicts)
  • The second person to push: if the server side datapackage is different to the datapackage that was loaded: the user could get a notification and ask them to reload and edit it again
@cpina cpina added the enhancement New feature or request label Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant