Bug 32260

Summary: Prevent alert when searching patron (autocomplete)
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, martin.renvoize, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32261
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Attachments: Bug 32260: Patron autocomplete - Do not display an alert if request is rejected
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected
Bug 32260: Patron autocomplete - Do not display an alert if request is rejected

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 2022-11-23 12:48:17 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!