Bug 35303 - Staff interface header - patron search autocomplete no longer works (Uncaught TypeError: search_fields.forEach is not a function)
Summary: Staff interface header - patron search autocomplete no longer works (Uncaught...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 26916
Blocks:
  Show dependency treegraph
 
Reported: 2023-11-09 13:24 UTC by David Nind
Modified: 2023-11-11 07:16 UTC (History)
2 users (show)

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


Attachments
Bug 35303: (bug 26916 follow-up) Fix paton autocomplete (1.03 KB, patch)
2023-11-09 14:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35303: (bug 26916 follow-up) Fix paton autocomplete (1.07 KB, patch)
2023-11-09 14:36 UTC, David Nind
Details | Diff | Splinter Review
Bug 35303: (bug 26916 follow-up) Fix paton autocomplete (1.13 KB, patch)
2023-11-09 15:03 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2023-11-09 13:24:03 UTC
The patron search autocomplete is no longer working in master (it was working yesterday, it wasn't after I did a git pull for Koha).

To replicate:
1. In the staff interface, start a search for a patron in the header (with check out selected), for example: mary
2. Notice that the autocomplete results are not displayed, and that there is a spinner going round just before the search button.
3. Under web developer tools note that there is a JavaScript error in the console:

Uncaught TypeError: search_fields.forEach is not a function
    buildPatronSearchQuery http://127.0.0.1:8081/intranet-tmpl/prog/js/staff-global_23.0600073.js:615
    buildPatronSearchQuery http://127.0.0.1:8081/intranet-tmpl/prog/js/staff-global_23.0600073.js:613
    source http://127.0.0.1:8081/intranet-tmpl/prog/js/staff-global_23.0600073.js:453
    jQuery 6
Comment 1 Jonathan Druart 2023-11-09 14:11:37 UTC
Created attachment 158717 [details] [review]
Bug 35303: (bug 26916 follow-up) Fix paton autocomplete

Fix the following JS error:
Uncaught TypeError: search_fields.forEach is not a function
Comment 2 David Nind 2023-11-09 14:36:14 UTC
Created attachment 158721 [details] [review]
Bug 35303: (bug 26916 follow-up) Fix paton autocomplete

Fix the following JS error:
Uncaught TypeError: search_fields.forEach is not a function

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2023-11-09 14:36:34 UTC
Thanks Jonathan!
Comment 4 Pedro Amorim 2023-11-09 15:03:17 UTC
Created attachment 158742 [details] [review]
Bug 35303: (bug 26916 follow-up) Fix paton autocomplete

Fix the following JS error:
Uncaught TypeError: search_fields.forEach is not a function

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 5 Tomás Cohen Arazi 2023-11-09 17:44:18 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-11-11 07:16:31 UTC
Depends on Bug 26916 not in 23.05.x