CRM-12862 Enhanced export for "merge contacts with same address" - family names

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.3.2, 4.3.3, 4.3.4
    • Fix Version/s: Unscheduled
    • Component/s: Core CiviCRM
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      Enhancements to ‘Merge contacts with same address’ Export option:

      Working with several groups, I have consistently found they request this enhancement to this export option. Basically, it comes down to names:

      Currently, if a couple lives at the same address, and the ‘merge contacts with same address’ functionality is used, their merged addressee field come out as a list of names separated by commas: “Jane Smith, Henry Smith” . These are actually the individual addressee fields of the contacts, so they could also be “Dr. Jane Smith, Mr. Henry Smith III” ( I am going to take the simplistic case where we are NOT using prefixes suffixes).

      Wouldn’t it be better if it were exported like : “Jane & Henry Smith”, if they had the same last name; or if different last names, it would need to be “Jane Smith & Henry Jones”

      Likewise, in the Postal Greeting, I prefer concatenating the names with “&” rather than “,” . I this patch, to produce a

      To do this, it compares the last_name of the ‘master’ contact and the ‘copy’ contact. If they are the same, it prepends the first_name field + & of the ‘copy’ contact onto the master contact addressee field, so you get ‘Jane & ’ . ‘Henry Smith’. It also produces a 'postal greeting' export that includes the postal_greeting field of the master contact + the first_name field of the copy contact: 'Jane & Henry' ( I just left off any 'Dear..' terminology, to be included downstream.)

      The attached patch does just this; but I’m not convinced it should be implemented for core Civi. For one thing, using the default Addressee format, which includes prefixes and suffixes, it will break the display, ending with things like “Jane & Mr. Henry Smith” (It won’t include ‘Dr. Jane’ even if she has that prefix).

      So it works well as long as your Addressee format is plain-jane

      {contact.first_name} { } {contact.last_name} ; and your postal greeting format is {contact.first_name}

      Any customized addressee format in the ‘copy’ contact won’t be presented in the Addressee field- it will just be that contacts first name.

        Attachments

          Activity

          [CRM-12862] Enhanced export for "merge contacts with same address" - family names
          David Greenberg added a comment -

          This seems useful and could be added to core if you can extend that patch to include an on/off switch (radio button?) for it in the export task form. Maybe something like:

          [ ] Concatenate list of names with commas (Jane Adams, Harry Adams) [ ] Combine family names with & ("Jane & Harry Adams")

          Jim Earl added a comment -

          David,

          I think that is a good idea: I will try to rewrite what I have done so that provides a better user interface, giving a choice between the traditional version of 'merge contacts with same address' and this one. I will resubmit a better patch when it's ready.

          I started this last week, but got distracted onto other things ( like my new day job!). But I will try to make it happen in the next few weeks.

          Eileen McNaughton added a comment -

          I'm closing this because I think it has aged out of relevance. The code has had a bit of a re-write since then and while this may still not be fixed it needs to be reassessed from the start. We are also pushing pretty hard into adding unit tests for a change like this now.

            People

            • Assignee:
              Unassigned
              Reporter:
              Jim Earl

              Dates

              • Created:
                Updated:
                Resolved: