{"action":"created","issue":{"url":"https://api.github.com/repos/civicrm/civicrm-core/issues/8251","repository_url":"https://api.github.com/repos/civicrm/civicrm-core","labels_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/8251/labels{/name}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/8251/comments","events_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/8251/events","html_url":"https://github.com/civicrm/civicrm-core/pull/8251","id":151303339,"number":8251,"title":"Dedupe fixes CRM-18442, CRM-18546 ,  CRM-18539, \tCRM-18480 ","user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?v=3","gravatar_id":"","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/civicrm/civicrm-core/labels/master","name":"master","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-27T05:38:19Z","updated_at":"2016-05-18T14:34:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/8251","html_url":"https://github.com/civicrm/civicrm-core/pull/8251","diff_url":"https://github.com/civicrm/civicrm-core/pull/8251.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/8251.patch"},"body":"This PR contains fixes for several merge issues & includes the changes in #8385 (still open in case John prefers to QA a smaller PR) and #8352 ( which I'm closing in favour of this).\r\n\r\nIncludes\r\n * [CRM-18480 fix batch merge job to cope with new inability to re-merge (regression this QA cycle)](https://issues.civicrm.org/jira/browse/CRM-18480)\r\n * [CRM-18539 CRM-18539: Permit criteria for batch merging (other than group) (new api feature)](https://issues.civicrm.org/jira/browse/CRM-18539)\r\n * [CRM-18546 Duplicate email addresses created when merging in 4.7 (4.7 regression)](https://issues.civicrm.org/jira/browse/CRM-18546)\r\n * [CRM-18442 Dedupe query: remove OR join in favour of more performant union (improvement in 4.7, note there are other code areas to expand this to -ie Org, Household, unsupervised queries).](https://issues.civicrm.org/jira/browse/CRM-18442)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/civicrm/civicrm-core/issues/comments/220045620","html_url":"https://github.com/civicrm/civicrm-core/pull/8251#issuecomment-220045620","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/8251","id":220045620,"user":{"login":"JKingsnorth","id":5212601,"avatar_url":"https://avatars.githubusercontent.com/u/5212601?v=3","gravatar_id":"","url":"https://api.github.com/users/JKingsnorth","html_url":"https://github.com/JKingsnorth","followers_url":"https://api.github.com/users/JKingsnorth/followers","following_url":"https://api.github.com/users/JKingsnorth/following{/other_user}","gists_url":"https://api.github.com/users/JKingsnorth/gists{/gist_id}","starred_url":"https://api.github.com/users/JKingsnorth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JKingsnorth/subscriptions","organizations_url":"https://api.github.com/users/JKingsnorth/orgs","repos_url":"https://api.github.com/users/JKingsnorth/repos","events_url":"https://api.github.com/users/JKingsnorth/events{/privacy}","received_events_url":"https://api.github.com/users/JKingsnorth/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T14:34:39Z","updated_at":"2016-05-18T14:34:39Z","body":"I've tested commit 664d553 (CRM-18546 Duplicate email addresses created when merging in 4.7) in isolation and it appears to work OK.\r\n\r\n* Tested safe merging contacts with duplicate email addresses - no duplicate email created\r\n* Tested safe merging contacts with duplicate email address and conflicting addresses - caught as a conflict\r\n* Tested force merging those contacts - no duplicate email address added\r\n* Tested safe merging contacts with duplicate phones - no duplicate phone created either - yay\r\n* Tested a 'manual' merge and the add/overwrite options for location fields still work as expected\r\n\r\nSo I think that commit, in isolation, is good.\r\n\r\nI wondered whether we should extend the test to check for duplicate phone numbers too - but I don't think it's necessary."}}