systopia / de.systopia.xcm

CiviCRM Extended Contact Matcher
Other
5 stars 11 forks source link

Filling details with Email not working as expected #85

Open jaapjansma opened 3 years ago

jaapjansma commented 3 years ago

With the fill details options I would expect that a email is added when no email with the location type exists.

When an email with that location type already exists I would expect that nothing changes. However the new email gets added and I end up with two emails of the same location type.

Steps to reproduce

  1. Create an XCM Profile with no overriding details and at fill details select email, for location type select home
  2. On this profile match on external identifier
  3. Create a contact with external identifier 123aa and add a email test1@example.com with location type home
  4. Now use the XCM profile to lookup/create a contact. I have used the form processor for this. Provide data as follows, external identifier 123aa and add the email test2@example.com (the email is different)

Expected result

Nothing will happen because an email with the location type home already exists.

Actual result

The email gets added and the contacts has two email with location type home

Remarks

It is possible to have multiple emails with the same location type. So in one sense this behavior is correct.

However in my specific use case this is exactly not what we want.

For the address field we already have such options. Fill if contact has no address, or fill if contact no address of that type.