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
Created attachment 187477 [details] [review] 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.
Created attachment 187478 [details] [review] Bug 32176: Use patron_to_html Thanks to bug 40958.
Created attachment 187479 [details] [review] Bug 32176: Fix list transfer
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
(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?
(In reply to Jonathan Druart from comment #5) > Do you have bug 40958 applied? Yes
(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.
Created attachment 187728 [details] [review] 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>
Created attachment 187729 [details] [review] Bug 32176: Use patron_to_html Thanks to bug 40958. Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Created attachment 187730 [details] [review] Bug 32176: Fix list transfer Signed-off-by: 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.
Back to signed off. The issue I ran into with ", Henry" is existing problematic behavior for which I'll file a new bug.
Created attachment 187841 [details] [review] Bug 32176: Fix punctuation in patron search
Created attachment 187842 [details] [review] Bug 32176: Add Cypress tests
(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/