Bug 40995

Summary: Patron search autocomplete adds extraneous spacing and punctuation when patron lacks surname
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 40958    
Bug Blocks:    
Attachments: Bug 40995: Use patron_to_html in patron autocomplete
Bug 40995: Use patron_to_html in patron autocomplete

Description Andrew Fuerste-Henry 2025-10-10 14:13:59 UTC
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."
Comment 1 Jonathan Druart 2025-10-10 14:15:46 UTC
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."
Comment 2 Andrew Fuerste-Henry 2025-10-10 15:07:50 UTC
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>