Bug 41039 - Patron search button can be spammed and trigger many API patron searches
Summary: Patron search button can be spammed and trigger many API patron searches
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords: RM_priority
Depends on:
Blocks: 41048
  Show dependency treegraph
 
Reported: 2025-10-16 23:09 UTC by Kyle M Hall (khall)
Modified: 2025-10-17 19:15 UTC (History)
7 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41039: Prevent patron search button from being spammed triggering multiple api requests (3.90 KB, patch)
2025-10-17 11:20 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 41039: Prevent patron search button from being spammed triggering multiple api requests (3.96 KB, patch)
2025-10-17 19:15 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2025-10-16 23:09:22 UTC
Every click of the "Search" button on members/members-home.pl will trigger another patron search api request. This button should be disabled until the first searches results are displayed.

To demonstrate, open the network tab of the developer console on your web browser. Note each click if the button show another patron search api request.
Comment 1 Kyle M Hall (khall) 2025-10-17 11:20:49 UTC
Created attachment 188063 [details] [review]
Bug 41039: Prevent patron search button from being spammed triggering multiple api requests

Every click of the "Search" button on members/members-home.pl or other area that utilizes patrons searching,
will trigger another patron search api request. This button should be disabled until the first searches results are displayed.

To demonstrate, open the network tab of the developer console on your web browser. Note each click if the button show another patron search api request.

Test Plan:
1) Browse to members-home.pl
2) Open the network tab of the developer console on your web browser
3) Double click the Search button
4) Note the two api requests in the network tab
5) Apply this patch
6) Reload the page
7) Double click the Search button
8) Note only one api request is made

If your results come back too fast, you may perform an initial search,
then change the number of results from the default 20 to "All" to
create a search that will take longer.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 2 Caroline Cyr La Rose 2025-10-17 19:15:16 UTC
Created attachment 188123 [details] [review]
Bug 41039: Prevent patron search button from being spammed triggering multiple api requests

Every click of the "Search" button on members/members-home.pl or other area that utilizes patrons searching,
will trigger another patron search api request. This button should be disabled until the first searches results are displayed.

To demonstrate, open the network tab of the developer console on your web browser. Note each click if the button show another patron search api request.

Test Plan:
1) Browse to members-home.pl
2) Open the network tab of the developer console on your web browser
3) Double click the Search button
4) Note the two api requests in the network tab
5) Apply this patch
6) Reload the page
7) Double click the Search button
8) Note only one api request is made

If your results come back too fast, you may perform an initial search,
then change the number of results from the default 20 to "All" to
create a search that will take longer.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 3 Caroline Cyr La Rose 2025-10-17 19:15:51 UTC
I needed to put it in "Need Signoff" to then go to "Signed off". Sorry!