Bug 32260 - Prevent alert when searching patron (autocomplete)
Summary: Prevent alert when searching patron (autocomplete)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-18 08:51 UTC by Jonathan Druart
Modified: 2024-07-04 20:37 UTC (History)
3 users (show)

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


Attachments
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected (1.72 KB, patch)
2022-11-18 09:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected (1.77 KB, patch)
2022-11-18 12:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected (1.82 KB, patch)
2022-11-19 20:14 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-11-18 08:51:21 UTC

    
Comment 1 Jonathan Druart 2022-11-18 09:06:34 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2022-11-18 12:05:46 UTC
Created attachment 144057 [details] [review]
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected

Not sure what is going on exactly, neither if this patch is the correct
way to fix this.
The request is "rejected" at some point (by the browser?), when we
search for patrons using the autocomplete and DT "at the same time".

To recreate:
Don't apply this patch
Go to /cgi-bin/koha/reserve/request.pl?biblionumber=1&borrowernumber=5
Search for "edn" then hit enter
You may see an alert, that will disappear
If you don't see the alert, repeat

This patch suggests to ignore the alert if the status of the request is
"rejected".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Owen Leonard 2022-11-18 12:10:43 UTC
I was able to reproduce this problem by following the test plan, bug specifically:

- You must search for a string which will return only one result.
- You must enter the string and hit ENTER before the autocomplete has time to show any results. I was able to do this by copying the string and using Ctrl-V to quickly paste and hit enter right away.
Comment 4 Katrin Fischer 2022-11-19 20:14:11 UTC
Created attachment 144092 [details] [review]
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected

Not sure what is going on exactly, neither if this patch is the correct
way to fix this.
The request is "rejected" at some point (by the browser?), when we
search for patrons using the autocomplete and DT "at the same time".

To recreate:
Don't apply this patch
Go to /cgi-bin/koha/reserve/request.pl?biblionumber=1&borrowernumber=5
Search for "edn" then hit enter
You may see an alert, that will disappear
If you don't see the alert, repeat

This patch suggests to ignore the alert if the status of the request is
"rejected".

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi (tcohen) 2022-11-23 12:48:17 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!