CRM-19179 Handle 'primary' contact information when manually merging contacts

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.10
    • Fix Version/s: 4.7.13
    • Component/s: Dedupe
    • Labels:
    • Documentation Required?:
      None
    • Sprint:
      4.7.13 Merge
    • Funding Source:
      Contributed Code

      Description

      When merging contacts, and adding a new address, it is not possible to specify which one should be primary.

      So currently.

      Duplicate (record to delete)
      Work address (PRIMARY)

      Master (record to keep)
      Home address (PRIMARY)

      [Choose to 'migrate' the work address to the master record when merging]

      Result
      Home address (PRIMARY)
      Work address

      ie: The 'primary' address on the master record stays primary.

      This is reasonable default behaviour, however you may wish to specify a different address to be primary.

      Proposed solution:

      Add checkboxes to the 'manual' merge screen which allows you to 'Set as primary' any of the addresses, phone numbers or email addresses that are being 'migrated'.

        Attachments

          Activity

          [CRM-19179] Handle 'primary' contact information when manually merging contacts
          Coleman Watts added a comment -

          Thanks for the suggestion. I agree this would be a good improvement.

          As a lower-priority unfunded issue, this can be moved forward by either:

          1. Contributing code to fix this in the form of a pull-request.
          2. Funding the core team to work on this via the paid-issue-queue.
          John K. added a comment -

          It's in our JIRA to pick up over the next couple of weeks.

          John K. added a comment - - edited

          Coleman Watts / Eileen McNaughton

          All the functionality is here and tested now, but before sending it through to QA I was hoping to get some advice on how to write a unit test for it. I guess it will really be the first tests for the 'mergeLocations' function. The nature of the merging process makes this a little tricky, so I'm not sure what the best way to start is.

          One approach would be to set up some dummy contacts with addresses/phones and then manually call the functions that would set up the parameters to pass into 'mergeLocations'. Then check the results after the 'mergeLocations' function runs to make sure everything is as expected.

          This might be the best we can do with the current setup? I figure it's better to have some less-than-perfect tests on the less-than-perfect architecture, than no tests on a less-than-perfect architecture?

          But I'd really value some feedback on this before I get started. Happy to review some PRs in return [=

            People

            • Assignee:
              John K.
              Reporter:
              John K.

              Dates

              • Created:
                Updated:
                Resolved: