systopia / de.systopia.xcm

CiviCRM Extended Contact Matcher
Other
5 stars 11 forks source link

Filling details with Phone number not working as expected #82

Open jaapjansma opened 3 years ago

jaapjansma commented 3 years ago

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

When a phone number with that location type and phone type already exists I would expect that nothing changes. However the new phone number gets added and I end up with two phones of the same location type and phone type.

Steps to reproduce

  1. Create an XCM Profile with no overriding details and at fill details select phone, for location type select home and phone type phone
  2. On this profile match on external identifier
  3. Create a contact with external identifier 123aa and add a phone number 0123456789 with location type home and phone type phone
  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 phone number 987654321 (the phone number is different)

Expected result

Nothing will happen because a phone with the location type home and phone type phone already exists.

Actual result

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

Remarks

It is possible to have multiple phone numbers with the same location type and phone 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.