Request a Copy: repeated clicks on submit / send create duplicate requests and emails
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 100
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
bug parity
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
WenyuChiou/agent-board#1489 ·
メンテナーはふだん 1 日以内に返信
-
area: bazaar bug complexity: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
accensa/x402-facilitator-stellar#779 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue P4 size:S web-ui
難易度 2/5 半日 初心者へのやさしさ 85/100
josephfung/curia#2600 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
cloudflare/partykit#444 ·