[Bug 31782] New: Patron lists - patron autocomplete search does not work
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Bug ID: 31782 Summary: Patron lists - patron autocomplete search does not work Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: david@davidnind.com QA Contact: testopia@bugs.koha-community.org When adding a patron to a list, the autocomplete search does not work. Instead, you have to paste the patron card number or borrower number into the Add multiple patrons form. To replicate: 1. Go to Tools > Patrons and circulation > Patron lists. 2. Add a new patron list. 3. Go to add patrons page for the list. Note that there is a JavaScript in the web developer tools console [1]. 4. Type an existing name in the patron search box, for example: mary. 5. Note that the progress icon/circle appears very briefly, but the name is not autocompeleted. 6. Note also that there is a 400 bad request error in the web developer tools console.[2] [1] JavaScript error when viewing Add patrons page for a patron list: Uncaught TypeError: can't access property "_renderItem", $(...).autocomplete(...).data(...) is undefined patron_autocomplete http://127.0.0.1:8081/intranet-tmpl/js/autocomplete/patrons_22.0600062.js:20 <anonymous> http://127.0.0.1:8081/cgi-bin/koha/patron_lists/list.pl?patron_list_id=1:108... jQuery 2 e t [2] 400 bad request error when typing a name in the autocomplete field: GET http://127.0.0.1:8081/api/v1/patrons?term=mary Status: 400 Bad Request Version: HTTP/1.1 .. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This feels related to bug 30578.. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30578 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30578 [Bug 30578] We should drop circ/ysearch.pl in preference to using the REST API's -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_11_candidate Severity|normal |critical -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron lists - patron |Patron autocomplete broken |autocomplete search does |when using |not work |js/autocomplete/patrons.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 143778 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143778&action=edit Bug 31782: Fix patron autocomplete on patron list Test plan: Add new patrons to a patron list -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 143779 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143779&action=edit Bug 31782: Fix patron autocomplete on order search Test plan: Search for order using the "Basket created by" field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 143780 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143780&action=edit Bug 31782: Fix autocomplete when duplicating orders Test plan: Add a new order to a basket from an existing order Search for the order to duplicate using the "Basket created by" field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 143781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143781&action=edit Bug 31782: Remove js/autocomplete/patrons.js On 30578 we replace circ/ysearch.pl with a call to the /api/v1/patrons route. A new patron_autocomplete JS function has been written (js/patron-autocomplete.js) for that purpose. However 3 occurrences were using an existing patron_autocomplete function, and 30578 didn't take care of adjusting correctly the call to the REST API route. On this patchset I am suggesting to copy/paste the JS functions defined in js/autocomplete/patrons.js, because we are very close of the 22.11 release. But ideally we should improve js/patron-autocomplete.js to add a new 'on-select-add-to' option that will take care of add/remove/hide behaviour. IMO that must be done on a separate bug, and after 22.11 is released (to not need to retest the other occurrences of the patron autocomplete) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #5)
On this patchset I am suggesting to copy/paste the JS functions defined in js/autocomplete/patrons.js, because we are very close of the 22.11 release. But ideally we should improve js/patron-autocomplete.js to add a new 'on-select-add-to' option that will take care of add/remove/hide behaviour. IMO that must be done on a separate bug, and after 22.11 is released (to not need to retest the other occurrences of the patron autocomplete)
See bug 32176. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143778|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 143782 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143782&action=edit Bug 31782: Fix patron autocomplete on patron list Test plan: Add new patrons to a patron list Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143779|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 143783 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143783&action=edit Bug 31782: Fix patron autocomplete on order search Test plan: Search for order using the "Basket created by" field Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143780|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 143784 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143784&action=edit Bug 31782: Fix autocomplete when duplicating orders Test plan: Add a new order to a basket from an existing order Search for the order to duplicate using the "Basket created by" field Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143781|0 |1 is obsolete| | --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 143785 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143785&action=edit Bug 31782: Remove js/autocomplete/patrons.js On 30578 we replace circ/ysearch.pl with a call to the /api/v1/patrons route. A new patron_autocomplete JS function has been written (js/patron-autocomplete.js) for that purpose. However 3 occurrences were using an existing patron_autocomplete function, and 30578 didn't take care of adjusting correctly the call to the REST API route. On this patchset I am suggesting to copy/paste the JS functions defined in js/autocomplete/patrons.js, because we are very close of the 22.11 release. But ideally we should improve js/patron-autocomplete.js to add a new 'on-select-add-to' option that will take care of add/remove/hide behaviour. IMO that must be done on a separate bug, and after 22.11 is released (to not need to retest the other occurrences of the patron autocomplete) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 advsalahuddinahmed072@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |advsalahuddinahmed072@gmail | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143782|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143806 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143806&action=edit Bug 31782: Fix patron autocomplete on patron list Test plan: Add new patrons to a patron list Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143783|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143807&action=edit Bug 31782: Fix patron autocomplete on order search Test plan: Search for order using the "Basket created by" field Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143784|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143808&action=edit Bug 31782: Fix autocomplete when duplicating orders Test plan: Add a new order to a basket from an existing order Search for the order to duplicate using the "Basket created by" field Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143785|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143809 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143809&action=edit Bug 31782: Remove js/autocomplete/patrons.js On 30578 we replace circ/ysearch.pl with a call to the /api/v1/patrons route. A new patron_autocomplete JS function has been written (js/patron-autocomplete.js) for that purpose. However 3 occurrences were using an existing patron_autocomplete function, and 30578 didn't take care of adjusting correctly the call to the REST API route. On this patchset I am suggesting to copy/paste the JS functions defined in js/autocomplete/patrons.js, because we are very close of the 22.11 release. But ideally we should improve js/patron-autocomplete.js to add a new 'on-select-add-to' option that will take care of add/remove/hide behaviour. IMO that must be done on a separate bug, and after 22.11 is released (to not need to retest the other occurrences of the patron autocomplete) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan.berndtsson@ub.gu.se --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 32015 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31782 Bug 31782 depends on bug 30578, which changed state. Bug 30578 Summary: We should drop circ/ysearch.pl in preference to using the REST API's https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30578 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org