Cannot search for fullname when sort_name is {contact.last_name}{, }{contact.first_name}
Overview
If we have sort_name like {contact.last_name}{, }{contact.first_name}, users are not able to search for the full name: "{first_name} {last_name}".
Example use-case
Assuming you have a John Doe (sort name: "Doe, John")
- On the quick search bar write "John Doe" OR
- Go to Search->Search Contacts and search for "John Doe" on "Name or Email"
Current behaviour
Contact is not found.
Proposed behaviour
Contact should be found.
Comments
I know that altering the sort_name to {contact.first_name}{ }{contact.last_name} would allow to search for the full name, but it is not what we ant to achieve. We want to be able to keep the sort_name as is and to be able to search by both "Doe, John" or "John Doe" and retrieve the contact.
Btw, this has been raised a few years back: https://civicrm.stackexchange.com/questions/11190/cant-search-by-first-name-last-name-wordpress-dashboard/