Problem with synchronisation with spreadsheet

未关闭
#2,941 6 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
javascript
领域
backend

调研方向

首先阅读链接的 Forms issue 2165 以及围绕 PostWriteListener 的 richdocuments 集成,重点关注电子表格保存如何与表单提交交互。根据列出的步骤复现覆盖序列,并跟踪文件更改如何使活动会话失效或得以保留。完成的标准是:richdocuments 保存不能悄无声息地覆盖最新提交,并且会提示受影响的用户重新加载或下载更新后的版本。

由索引模型根据 Issue 内容生成。

描述

0. Needs triage bug

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:

  1. Open the file via richdocuments.
  2. Fill out the form.
  3. 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.

主要语言
JavaScript
星标
385
派生
133
平均合并
7 小时 54 分钟
30 天内合并 PR
157

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/forms 的其他 Issue

查看 nextcloud/forms 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。