Request a Copy: repeated clicks on submit / send create duplicate requests and emails
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 40/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- angular, typescript
- 领域
- frontend
调研方向
The three affected actions are onSubmit() in the Request a Copy page and grant() and deny() in the response-form components, which the issue links to bitstream-request-a-copy-page, grant-request-copy and deny-request-copy. Check where each button's disabled binding is set and where the REST call is dispatched, and confirm nothing guards against a call already in flight. Done means one click produces one request, the button is disabled with a spinner while pending, and it re-enables after a network error. The author says they plan to open a PR, so coordinate before starting.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
The Request a Copy form and the grant/deny email response forms do not prevent repeated submissions while a request is in flight. Each additional click on the submit button fires another REST request, causing the backend to create several identical item requests and dispatch multiple duplicate notification emails to authors and submitters.
Affected buttons:
-
"Request copy" on the initial request form (
bitstream-request-a-copy-page) -
"Send" on the grant email form (
grant-request-copy) -
"Send" on the deny email form (
deny-request-copy) -
DSpace Version(s): Seen on DSpace 10.1 and confirmed on
main. The buttons are only disabled when the form is invalid (requestCopyForm.invalid), butonSubmit(),grant(), anddeny()have no in-flight execution check. -
Web Browser: Chrome 131, Firefox 132 (reproducible across all browsers).
To Reproduce
Steps to reproduce the behavior:
- Navigate to an item containing a restricted bitstream and click the file link to reach the Request a Copy form.
- Fill in the required fields (name, email, and message).
- In browser Developer Tools (Network tab), throttle network speed (e.g. to "Slow 3G") so the REST request takes 2–3 seconds.
- Click the "Request copy" button 3 or 4 times rapidly before the page redirects.
- In the browser Network tab, observe multiple parallel
POST /server/api/core/itemrequestsrequests sent (one for each click). - The item contact receives multiple duplicate email notifications for the same request.
(The same behavior can be reproduced on the grant and deny response forms by clicking "Send" repeatedly).
Expected behavior
- One submission should create exactly one item request and send one set of emails.
- While the request is in flight, the button should immediately be disabled and display a loading/spinner state.
- If the request encounters a network error, the button should become active again so the user can retry.
Related work
I have a UI fix ready (in-flight guard, disabled state, and spinner icon on all three buttons) and will open a pull request for this issue.
Question for maintainers: Would you also recommend adding a backend safeguard in DSpace/DSpace (such as rate-limiting or deduplicating identical requests within a short timeframe), or is the UI in-flight guard sufficient?
- 主要语言
- TypeScript
- 星标
- 180
- 派生
- 577
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 95
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DSpace/dspace-angular 的其他 Issue
-
accessibility affects: 10.x affects: main bug ux
难度 2/5 1-3 小时 新手友好度 72/100
DSpace/dspace-angular#6531 · 1 条评论 ·
维护者通常 1 天内回复
-
accessibility affects: 10.x affects: main bug help wanted
难度 2/5 1-3 小时 新手友好度 66/100
DSpace/dspace-angular#6530 ·
维护者通常 1 天内回复
-
Submission Form Allows Deletion of All Repeating Item Entries可能已有人在做 @Rowan-McKereghan 于 5 天前认领。 未关闭affects: 8.x affects: 9.x bug component: submission
难度 2/5 1-3 小时 新手友好度 72/100
DSpace/dspace-angular#6511 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Visual issues with qualdrop fields可能已有人在做 @DanGastardelli 于 15 天前认领。 未关闭affects: 10.x affects: 9.x bug claimed: Acervos Digitais component: submission Difficulty: Low ux
难度 2/5 1-3 小时 新手友好度 66/100
DSpace/dspace-angular#6412 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Facet headings have incorrect clickable area to expand/collapse可能已有人在做 @jesielviana 于 12 天前认领。 未关闭accessibility affects: 10.x affects: 8.x affects: 9.x bug ux
难度 2/5 1-3 小时 新手友好度 72/100
DSpace/dspace-angular#6364 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 DSpace/dspace-angular 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 78/100
steelbrain/node-ssh#487 ·
-
cli: `execCargoMetadata` decodes stdout per chunk, corrupting non-ASCII paths across pipe boundaries未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 62/100
lingdojo/kana-dojo#34127 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 68/100
osmlab/name-suggestion-index#13104 ·
维护者通常 1 天内回复