Answers.Body: <p>Our approach is to merge the duplicate contact that retains the contribution records, then apply a &quot;transferred&quot; status to make one membership dormant, then move the duplicate into the primary membership. This happens to us when a member renews using &quot;Bob Jones&quot; instead of &quot;Robert Jones&quot; and a duplicate record/membership is created. We then just add the membership term to the original and &quot;orphan&quot; the renewal membership by applying the &quot;transferred&quot; status.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-23T09:07:42.877Z
Answers.Text: thanks Keith, I see that it's not so unusual as a situation. Could be worth having a dedicated extension to do so ;-) the to-do-list is growing.
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-23T02:19:49.863Z
Answers.LastActivityDate: 2021-12-23T02:19:49.863Z
Answers.UserDisplayName: Keith Webb
Answers.Body: <p>I can see only mysql or php script way to do that because of the complexity because it will need to</p>
  <ol>
  <li><p>Update the line item reference i.e civicrm_line_item.entity_id, incase the membership doesn't have payment best to delete to avoid duplicate mysql error.</p>
  </li>
  <li><p>Merge civicrm_membership_payment</p>
  </li>
  <li><p>Merge custom groups data</p>
  </li>
  <li><p>Merge membership logs</p>
  </li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-17T22:58:21.920Z
Answers.Text: thanks Pradeep for sharing your advice
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-16T18:28:43.187Z
Answers.LastActivityDate: 2021-12-16T18:28:43.187Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>For some reason I ignore, a few contacts - that have been merged by our client - have 2 identical memberships when they should only have one.</p>
  <p><a href="https://i.sstatic.net/J3sOS.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/J3sOS.png" alt="Same guy / same ID but 2 Memberships" /></a></p>
  <p>I want to merge these memberships but can't find if it's possible without accessing the DB.</p>
  <p>I can search for memberships but then the 'action menu' provides no way to merge</p>
  <p><a href="https://i.sstatic.net/IKNHu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IKNHu.png" alt="enter image description here" /></a></p>
  <p>Is this possible?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-16T19:43:56.913Z
Comments.Text: i think there is an approach to use api explorer to shift payment from the Memb you will delete to the one to keep, alter the dates accordingly for Memb End Date, delete the other Memb.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-16T22:12:50.450Z
Comments.Text: We've either made sure all the info was on one of them and then deleted the duplicate, or we disable the one we don't need.
Comments.UserDisplayName: Jenni Simonis
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-17T10:49:49.233Z
Comments.Text: Does it matter to you?  In your screenshot, the first one is about to expire and the second will follow on so there is no actual gap in membership but it will complicate things if you are doing renewal notices.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-20T12:27:51.363Z
Comments.Text: yes we have scheduled reminders so this will be confusing for the members. Actually, that's why I want to merge them because this situation has already induce unnecessary payments from clients that are not so skilled with internet.
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-20T12:29:18.413Z
Comments.Text: thanks Pete and Jenni, this is already one good approach to move contributions and then delete unnecessary membershp
Comments.UserDisplayName: Guillaume Sorel
Tags: <civimember><duplicate-contacts>
Title: How to merge two Memberships for the same contact?
ThreadText: # How to merge two Memberships for the same contact?
  
  (Asked by: username_0 on 2021-12-16)
  
  For some reason I ignore, a few contacts - that have been merged by our client - have 2 identical memberships when they should only have one.
  
  [![Same guy / same ID but 2 Memberships](https://i.sstatic.net/J3sOS.png)](https://i.sstatic.net/J3sOS.png)
  
  I want to merge these memberships but can't find if it's possible without accessing the DB.
  
  I can search for memberships but then the 'action menu' provides no way to merge
  
  [![enter image description here](https://i.sstatic.net/IKNHu.png)](https://i.sstatic.net/IKNHu.png)
  
  Is this possible?
  
  **Tags:** civimember, duplicate-contacts
  
  > **Comments:**
  > **username_1**: i think there is an approach to use api explorer to shift payment from the Memb you will delete to the one to keep, alter the dates accordingly for Memb End Date, delete the other Memb.  
  > **username_2**: We've either made sure all the info was on one of them and then deleted the duplicate, or we disable the one we don't need.  
  > **username_3**: Does it matter to you?  In your screenshot, the first one is about to expire and the second will follow on so there is no actual gap in membership but it will complicate things if you are doing renewal notices.  
  > **username_0**: yes we have scheduled reminders so this will be confusing for the members. Actually, that's why I want to merge them because this situation has already induce unnecessary payments from clients that are not so skilled with internet.  
  > **username_0**: thanks Pete and Jenni, this is already one good approach to move contributions and then delete unnecessary membershp  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2021-12-23. Score: 3
  
  Our approach is to merge the duplicate contact that retains the contribution records, then apply a "transferred" status to make one membership dormant, then move the duplicate into the primary membership. This happens to us when a member renews using "Bob Jones" instead of "Robert Jones" and a duplicate record/membership is created. We then just add the membership term to the original and "orphan" the renewal membership by applying the "transferred" status.
  
  > **Comments:**
  > **username_0**: thanks Keith, I see that it's not so unusual as a situation. Could be worth having a dedicated extension to do so ;-) the to-do-list is growing.  
  
  ---
  
  ### Answer by username_5 on 2021-12-16. Score: 1
  
  I can see only mysql or php script way to do that because of the complexity because it will need to
  
  1. Update the line item reference i.e civicrm\_line\_item.entity\_id, incase the membership doesn't have payment best to delete to avoid duplicate mysql error.
  2. Merge civicrm\_membership\_payment
  3. Merge custom groups data
  4. Merge membership logs
  
  > **Comments:**
  > **username_0**: thanks Pradeep for sharing your advice  
  
  ---
  
  