[Bug 32176] New: js/patron-autocomplete.js need another option
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Bug ID: 32176 Summary: js/patron-autocomplete.js need another option Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org See commit message from "Bug 31782: Remove js/autocomplete/patrons.js" We need another option in this function, and remove code duplicate from patron_lists/list.tt, acqui/histsearch.tt and acqui/duplicate_orders.tt -- 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=32176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on| |40958 Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40958 [Bug 40958] Move patron_to_html (from js-patron-format.inc) to a standalone JS file -- 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=32176 Jonathan Druart <jonathan.druart@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=32176 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187477 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187477&action=edit Bug 32176: Remove duplicated code to select patron from autocomplete On bug 31782 we centralized the code to autocomplete when searching for patron There were several occurrences in the code where some code were duplicated (when selecting patrons and allowing to remove them from a list). This patch centralizes this code by adding another parameter to patron_autocomplete: on-select-add-to Test plan: When duplicating an order, searching for orders, editing a course (and adding instructors) and adding patrons to a patron list, you should now see the correct patron details displayed: with preferred name, without "null" in case of missing surname, correct spacing, etc. Like (almost) everywhere else in Koha. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187478 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187478&action=edit Bug 32176: Use patron_to_html Thanks to bug 40958. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187479 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187479&action=edit Bug 32176: Fix list transfer -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|js/patron-autocomplete.js |Correctly display patrons |need another option |when selected after | |autocomplete (was | |js/patron-autocomplete.js | |need another option) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40699 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40699 [Bug 40699] Preferred name not displayed for instructors in course reserves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I get the following error when attempting to create a course with these patches applied: Template process failed: file error - js-patron-format.inc: not found at /kohadevbox/koha/C4/Templates.pm line 146 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Andrew Fuerste-Henry from comment #4)
I get the following error when attempting to create a course with these patches applied: Template process failed: file error - js-patron-format.inc: not found at /kohadevbox/koha/C4/Templates.pm line 146
Do you have bug 40958 applied? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #5)
Do you have bug 40958 applied?
Yes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|40699 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40699 [Bug 40699] Preferred name not displayed for instructors in course reserves in staff interface -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Andrew Fuerste-Henry from comment #6)
(In reply to Jonathan Druart from comment #5)
Do you have bug 40958 applied?
Yes
Indeed, sorry! There was a problem in the dependency tree. I have added a patch to bug 40958 to remove the occurrence added by bug 40699. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Andrew Fuerste-Henry <andrew@bywatersolutions.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=32176 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187477|0 |1 is obsolete| | --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 187728 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187728&action=edit Bug 32176: Remove duplicated code to select patron from autocomplete On bug 31782 we centralized the code to autocomplete when searching for patron There were several occurrences in the code where some code were duplicated (when selecting patrons and allowing to remove them from a list). This patch centralizes this code by adding another parameter to patron_autocomplete: on-select-add-to Test plan: When duplicating an order, searching for orders, editing a course (and adding instructors) and adding patrons to a patron list, you should now see the correct patron details displayed: with preferred name, without "null" in case of missing surname, correct spacing, etc. Like (almost) everywhere else in Koha. Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187478|0 |1 is obsolete| | --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 187729 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187729&action=edit Bug 32176: Use patron_to_html Thanks to bug 40958. Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187479|0 |1 is obsolete| | --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 187730 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187730&action=edit Bug 32176: Fix list transfer Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #8)
without "null" in case of missing surname, correct spacing, etc. Like (almost) everywhere else in Koha.
Oop, signed off too soon. When I removed Henry's surname I get ", Henry" in autocompletes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #12 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Back to signed off. The issue I ran into with ", Henry" is existing problematic behavior for which I'll file a new bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187841 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187841&action=edit Bug 32176: Fix punctuation in patron search -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 187842 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187842&action=edit Bug 32176: Add Cypress tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40995 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40995 [Bug 40995] Patron search autocomplete adds extraneous spacing and punctuation when patron lacks surname -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #15 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Andrew Fuerste-Henry from comment #12)
Back to signed off. The issue I ran into with ", Henry" is existing problematic behavior for which I'll file a new bug.
The last 2 patches fix the punctuation problem on the patron searches. On bug 40995 we will deal with the autocomplete. And we now have Cypress tests \o/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41156 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187728|0 |1 is obsolete| | Attachment #187729|0 |1 is obsolete| | Attachment #187730|0 |1 is obsolete| | Attachment #187841|0 |1 is obsolete| | Attachment #187842|0 |1 is obsolete| | --- Comment #16 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 188803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188803&action=edit Bug 32176: Remove duplicated code to select patron from autocomplete On bug 31782 we centralized the code to autocomplete when searching for patron There were several occurrences in the code where some code were duplicated (when selecting patrons and allowing to remove them from a list). This patch centralizes this code by adding another parameter to patron_autocomplete: on-select-add-to Test plan: When duplicating an order, searching for orders, editing a course (and adding instructors) and adding patrons to a patron list, you should now see the correct patron details displayed: with preferred name, without "null" in case of missing surname, correct spacing, etc. Like (almost) everywhere else in Koha. Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #17 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 188804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188804&action=edit Bug 32176: Use patron_to_html Thanks to bug 40958. Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #18 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 188805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188805&action=edit Bug 32176: Fix list transfer Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #19 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 188806 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188806&action=edit Bug 32176: Fix punctuation in patron search Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #20 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 188807 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188807&action=edit Bug 32176: Add Cypress tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #21 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41119 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41119 [Bug 41119] Autocompletion of basket creator does not work in acquisition-home.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com Resolution|--- |FIXED Status|Pushed to main |RESOLVED --- Comment #22 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This patch doesn’t apply cleanly to 25.05, so I’m not planning to backport it at this time. If you’re able to update it for 25.05 compatibility, I’d be happy to take another look. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Bug 32176 depends on bug 40958, which changed state. Bug 40958 Summary: Move patron_to_html (from js-patron-format.inc) to a standalone JS file https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40958 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #23 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 194877 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194877&action=edit Bug 32176: [25.05.x] Rebase for 25.05 Rebased the applicable patches for 25.05.x: - Remove duplicated code to select patron from autocomplete - Use patron_to_html - Fix list transfer Skipped patches which targeted files deleted in 25.05.x: - Fix punctuation in patron search - Add Cypress tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #24 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Laura Escamilla from comment #23)
Created attachment 194877 [details] [review] Bug 32176: [25.05.x] Rebase for 25.05
Rebased the applicable patches for 25.05.x: - Remove duplicated code to select patron from autocomplete - Use patron_to_html - Fix list transfer
Skipped patches which targeted files deleted in 25.05.x: - Fix punctuation in patron search - Add Cypress tests
IMO this is too many changes to backport, especially if it is only to fix spacing issues. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #25 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Please create a 25.05 patch that is safe to backport. Once that is created I will backport it ASAP. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #26 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Laura Escamilla from comment #25)
Please create a 25.05 patch that is safe to backport. Once that is created I will backport it ASAP.
I'm filing a new bug here: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42040 We'll need a fix for broken autocomplete ASAP in 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #27 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Laura Escamilla from comment #25)
Please create a 25.05 patch that is safe to backport. Once that is created I will backport it ASAP.
My suggestion is to revert to fix the autocomplete, then we can try to focus on fixing the spacing issues for 25.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #28 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Jonathan Druart from comment #27)
(In reply to Laura Escamilla from comment #25)
Please create a 25.05 patch that is safe to backport. Once that is created I will backport it ASAP.
My suggestion is to revert to fix the autocomplete, then we can try to focus on fixing the spacing issues for 25.05.
Yes please! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32176 --- Comment #29 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- A new 25.05.08-3 package is available thanks to MTJ! This excludes the patches that were breaking patron autocomplete. Those have been reverted. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org