3

I'm not sure which version this behavior changed in. When we edit a contact, and change the information so it matches another contact and click on the Check for Matching Contacts button, we get a pop-up that says, "Similar Contact Found", but below, it no longer gives us an options to immediately merge those two contacts. It used to have this option, very easy for us to merge with. Instead, admins have to save, leave the screen, and go into the Contacts menu to try and find the duplicate contacts.

I have tried this on the sandbox, and it is missing there as well. See screenshot here: https://imgur.com/m11rScH

Any way to get this back?

  • am trying to find if this was an intentional loss of functionality or not. – petednz - fuzion Oct 30 '18 at 22:03
  • @petednz-fuzion, were you able to find anything on this topic? Any way we can get this back or add it via a hook? I'd love a pointer on this, our admins are not too thrilled the functionality went away, it was way more simple to merge that way. – Paul B Nov 6 '18 at 17:35
  • discussion was here. chat.civicrm.org/civicrm/pl/frsqu7hgn7yb9d36tinofzkrnc. Eileen commented that at the point being described the Contact has not been saved hence it isn't a 'merge' per se. – petednz - fuzion Nov 6 '18 at 19:16
  • 1
    Not a solution exactly, but see my answer here which is a workaround which should work in your situation too, but yes you still have to save, just since you can get the contact id by hovering over the link in the popup you don't then have to hunt after: civicrm.stackexchange.com/questions/25237/… – Demerit Nov 8 '18 at 3:05
  • @Demerit, thanks much, that's a pretty useful workaround, actually. If I don't get anywhere with folks to add this useful function back into core, I'll look into building a small form on each contact screen to allow that contact to be merged with another (admins can put the contact id and it'll go to that URL). Though I'd much rather have a nicer solution. – Paul B Nov 8 '18 at 14:39
1

It looks like the merge link was taken away in a recent update when the page was updated to use ajax for the matching lookup. For those who may be looking for a temporary work-around (until hopefully this comes back into the core product), using the URL info from @Demerit in the comments above, I looked for a way to add the Merge link back into the popup notification when a person clicks on the Find Matching Contacts button. This can be done by creating a custom Contact.tpl template and modifying one line in the "duplicates-msg-tpl" section.

The way I did it was to override just that template section, and then re-import the main Contact.tpl file (since I don't want to have to manage merging things every time that template changes). Not sure why, but I had to use the full path for that include call. Here is the example custom Contact.tpl file (you need to first define where your custom templates go and include that in the Civi Admin system settings). You may need to change the rgid to whatever rule id you use (it may not even be necessary to have that param in the URL at all, but I kept it there just in case). You may also want to switch your cid and oid values, depending on which contact you want to merge into the other. In this case, I'm assuming the one being edited should merge into the existing one that shows up on the list.

 {literal}
<script type="text/template" id="duplicates-msg-tpl">
  <em><%- info %></em>
  <ul class="matching-contacts-actions">
    <% _.forEach(contacts, function(contact) { %>
      <li>
        <a href="<%= CRM.url('civicrm/contact/view', {reset: 1, cid: contact.id}) %>"><%- contact.display_name %></a>{/literal}{if $contactId|intval > 0}{literal} (<a href="<%= CRM.url('civicrm/contact/merge', {reset: 1, oid: {/literal}{$contactId|intval}{literal}, cid: contact.id, action: 'update', rgid: 4}) %>">Merge</a>){/literal}{/if}{literal}
        <%- contact.email %>
      </li>
    <% }); %>
  </ul>
</script>
{/literal}
{include file="/var/www/civicrm/sites/all/modules/civicrm/templates/CRM/Contact/Form/Contact.tpl"}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.