If your autocomplete results include a patron without a surname, Koha still puts a comma and space between the first name and the nonexistent surname, like ", Henry."
Created attachment 187739 [details] [review] Bug 40995: Use patron_to_html in patron autocomplete So we deal with punctuation like in other places. If your autocomplete results include a patron without a surname, Koha still puts a comma and space between the first name and the nonexistent surname, like ", Henry."
Created attachment 187745 [details] [review] Bug 40995: Use patron_to_html in patron autocomplete So we deal with punctuation like in other places. If your autocomplete results include a patron without a surname, Koha still puts a comma and space between the first name and the nonexistent surname, like ", Henry." Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Created attachment 187843 [details] [review] Bug 40995: Add Cypress tests
Previously the patron autocomplete results had names in inverted format (surname first). The call to patron_to_html() needs 'invert_name: true' passed to keep existing format, so that cypress tests are happy.
Created attachment 187850 [details] [review] Bug 40995: (follow-up) pass invert_name in patron autocomplete Passes invert_name flag to patron_to_html to restore previous format in patron autocomplete.
Created attachment 188808 [details] [review] Bug 40995: Use patron_to_html in patron autocomplete So we deal with punctuation like in other places. If your autocomplete results include a patron without a surname, Koha still puts a comma and space between the first name and the nonexistent surname, like ", Henry." Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 188809 [details] [review] Bug 40995: Add Cypress tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 188810 [details] [review] Bug 40995: (follow-up) pass invert_name in patron autocomplete Passes invert_name flag to patron_to_html to restore previous format in patron autocomplete. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nice work everyone! Pushed to main for 25.11
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.
I’ve revisited this bug and decided to backport it to 25.05.x. Thank you for your patience with the change in direction.