Problem with synchronisation with spreadsheet
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 382
- Forks
- 127
- Avg merge
- 19h 31m
- Merged PRs (30d)
- 75
Description
Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Describe the bug
Continuation of the story https://github.com/nextcloud/forms/issues/2165. I noticed that this does not always work.
To Reproduce
Steps:
- Open the file via richdocuments.
- Fill out the form.
- After completing the form, make changes to the open file and save.
Result: The last submission will be overwritten by the version from richdocuments.
Expected behavior
It will not allow saving in richdocuments. It will ask to download the updated version first.
Additional context
The solution I found:
In richdocuments, listen to PostWriteListener and if it is CLI, invalidate (delete) all tokens for this file.
Result: All users of the file will receive a message that they need to reload the page. They reload and get the latest version.
Disadvantage: If users had unsaved changes, they will be lost. In my opinion, this is less critical because the user will see that their connection has been lost and will understand that they need to check if all changes are there (plus richdocuments has auto-save, so the impact is minimal). Because now, when richdocuments overwrites Submission, there is no way to track it, and it causes a lot of problems.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked forms issue 2165 and the richdocuments integration around PostWriteListener, focusing on how spreadsheet saves interact with form submissions. Reproduce the overwrite sequence from the listed steps and trace how file changes invalidate or preserve active sessions. Done means a richdocuments save cannot silently overwrite the latest submission and affected users are prompted to reload or download the updated version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100