Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21793

Linked address not updated when address is modified via profile

    Details

    • Type: Bug
    • Status: Open
    • Priority: Important
    • Resolution: Unresolved
    • Affects Version/s: 4.7.30
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      You have two contacts, Alice and Bob. Bob’s address “belongs” Alice. When Bob is updated via a profile, Bob’s address remains linked to Alice’s but the consistency of address field values is not preserved between Alice and Bob. This is bad because an edit-save cycle on Bob will wipe out the newly-entered address values, replacing them with the old value from Alice.

      Steps to reproduce:

      1. Set the unsupervised de-dupe rule to match on email only.
      2. Create a profile which updates contacts on duplicate match and contains the following fields
        • First Name(Individual)
        • Last Name(Individual)
        • Email (Primary)(Contact)
        • Street Address (Home)(Contact)
        • City (Home)(Contact)
        • Postal Code (Home)(Contact)
        • Country (Home)(Contact)
        • State (Home)(Contact)
      3. Create an individual contact as follows:
        • First Name: Alice
        • Last Name: Foo
        • Email: alice@example.com
        • Street Address (Home): 111 Apple Ave
        • City (Home): Abbington
        • Postal Code (Home): 11111
        • Country (Home): USA
        • State (Home): AL
      4. Create an individual contact as follows:
        • First Name: Bob
        • Last Name: Foo
        • Email: bob@example.com
        • Address (Home): (use Alice’s address)
      5. As an anonymous user, submit the profile with the following values:
        • First Name: Bob
        • Last Name: Foo
        • Email: bob@example.com
        • Street Address: 222 Banana Blvd
        • City: Benton
        • Postal Code: 222222
        • Country: USA
        • State: AL
      6. Expect either of the following:
        • Bob’s address is 222 Banana; Alice’s address is 111 Apple; the two are not linked
        • Bob’s and Alice’s addresses are both 222 Banana and linked
      7. Observe the following:
        • Bob’s address is 222 Banana; Alice’s address is 111 Apple; the two are linked
      8. Edit Bob’s contact record
      9. Save, without making any changes
      10. Expect that Bob’s address remains 222 Banana through this edit.
      11. Observe that Bob’s address is changed to 111 Apple and we’re all out of bananas!

      Other notes

      • Updating Alice’s address via a profile works fine — Bob’s address is updated.
      • As noted above, I’m not entirely sure what to expect when updating Bob’s address, but given the previous point, I think I’d lean towards expecting that Alice’s address is also updated.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              seanmadsen Sean Madsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: