Profile used for search results: contact type field shows internal name instead of label
Overview
If you create a profile to use for search results from simple or advanced search and include the contact subtype, the value shown is the internal name, not the label.
Reproduction steps
-
At
Administer > Customise Data and Screens > Contact Types
create a type as 'My new type' -
Edit the name to be 'My changed type'
-
Create/Update a contact to use the type just created
-
At
Administer > Customise Data and Screens > Profiles
create a profile, tick 'Search Views', addContact > Contact Subtype
as a field -
Go to `Search > Advanced Search, set 'Views for Display Contacts' to the profile just created. Do a search that includes the contact you created/updated
Current behaviour
The type shows as My_new_type
Expected behaviour
The type should show as My changed type
Environment information
- CiviCRM: 5.57.0 ... but maybe much earlier too.
Comments
Note that renaming the type shows the problem more clearly, but even without that, if the subtype was created with a name including a space it will show with an underscore instead of the space.