SearchKit 'LIKE' failing
Overview
Some uses of 'LIKE' don't work - eg dropdown labels.
Reproduction steps
- Create a SK search for Contacts
- Add
WHERE
Constituent Information: Marital Status
Is Like
%partner%
- Search
- Expand the Query Info section
See this dmaster link
Current behaviour
In API, the where
clause is as expected:
"where": [
[
"constituent_information.Marital_Status:name",
"LIKE",
"%partner%"
]
],
But the SQL is wrong:
WHERE (`constituent_information_1`.`marital_status_2` LIKE "")
Expected behaviour
The user's intent was to find contacts where the dropdown label matches the specified pattern.
- The intent is to search on the label, but only the name is available
- The pattern
%partner%
does not make it into the SQL at all.
Environment information
- CiviCRM: Master