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

Chaining shared addresses doesn't work correctly

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      User and Admin Doc
    • Funding Source:
      Contributed Code
    • Verified?:
      No
    • Overview:
      Hide
      With versions 4.7.24 and older, you can create a chain while sharing addresses.
      Changing the head of the chain only changes the addresses 2nd in line.

      Proposed fix:
      Prevent chaining addresses ad infinitum, and prevent sharing an address with itself.
      When changing a shared address, change the sharing too.
      Show
      With versions 4.7.24 and older, you can create a chain while sharing addresses. Changing the head of the chain only changes the addresses 2nd in line. Proposed fix: Prevent chaining addresses ad infinitum, and prevent sharing an address with itself. When changing a shared address, change the sharing too.
    • How it works currently:
      Hide
      Example 1
      using an address from a contact that uses a shared address

      Steps to reproduce:
      1. First, create three contacts: A, B, and C
      2. Create an address for contact A
      3. Use contact A's address for contact B
      4. Use contact B's address for contact C
      5. Change contact A's address

      Result:
      Contact C's address is not changed

      Example 2
      using an shared address for a contact that shares its address

      Steps to reproduce:
      1. First, create three contacts: A, B, and C
      2. Create an address for contact A
      3. Create a different address for contact B
      4. Use contact A's address for contact C
      5. Use contact B's address for contact A
      6. Change contact B's address

      Result:
      Contact C's address is changed at step 5, but not at step 6, because contact C uses contact A's address

      Example 3
      sharing an address with itself

      1. First, create a contact: A
      2. Create an address for contact A
      3. Use contact A's address for contact A's address

      Result:
      Share succeeds, and an endless loop is created
      Show
      Example 1 using an address from a contact that uses a shared address Steps to reproduce: 1. First, create three contacts: A, B, and C 2. Create an address for contact A 3. Use contact A's address for contact B 4. Use contact B's address for contact C 5. Change contact A's address Result: Contact C's address is not changed Example 2 using an shared address for a contact that shares its address Steps to reproduce: 1. First, create three contacts: A, B, and C 2. Create an address for contact A 3. Create a different address for contact B 4. Use contact A's address for contact C 5. Use contact B's address for contact A 6. Change contact B's address Result: Contact C's address is changed at step 5, but not at step 6, because contact C uses contact A's address Example 3 sharing an address with itself 1. First, create a contact: A 2. Create an address for contact A 3. Use contact A's address for contact A's address Result: Share succeeds, and an endless loop is created
    • How it should work:
      Hide
      Example 1
      Using contact B's address for contact A changes its own address AND contact C's address

      Example 2
      Contact C uses contact B's address, changing contact B's address changes contact C's address

      Example 3
      Share fails with with a warning message
      Show
      Example 1 Using contact B's address for contact A changes its own address AND contact C's address Example 2 Contact C uses contact B's address, changing contact B's address changes contact C's address Example 3 Share fails with with a warning message
    • Acceptance Criteria:
      Expected behavior of address sharing.

      Attachments

      1. fix-address-sharing-1.diff
        2 kB
        Daniël van Vuuren
      2. fix-address-sharing-2.diff
        2 kB
        Daniël van Vuuren

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            hollandopensource.nl Daniël van Vuuren
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2 hours
              2h
              Remaining:
              Remaining Estimate - 2 hours
              2h
              Logged:
              Time Spent - Not Specified
              Not Specified