"Primary" email option in Search Builder behaves as "Any"
If Primary is selected as the email location in Search Builder, then contacts with a matching email address which is not primary are returned in the search results.
- Click on Contacts -> Search Builder.
- Create a search term Contact | Email | Primary | = | <email_address>.
- Click Search.
Contacts having <email_address> as a non-primary email are returned. Primary seems to function like "Any". Same problem with other operators, e.g. Like, RegEx.
Only contacts having a matching email address which is primary should be returned.
- CiviCRM: 5.21.0
- PHP: 7.2
- CMS: Drupal 7.69
- Database: MariaDB 10.0
- Web Server: Apache 2.4.41
The current behavior is useful, but should be called "Any" rather than "Primary", and a working "Primary" option should by provided as well.
Confirmed on demo site