Answers.Body: <p>The first step is to stop the duplicates from happening. Are the memberships all tied to the same organization? Then it should not be doing that. The cases where I've seen it create duplicates is when memberships were in a pending state (contribution failed) <a href="https://lab.civicrm.org/dev/membership/-/issues/11" rel="nofollow noreferrer">https://lab.civicrm.org/dev/membership/-/issues/11</a>.</p>
  <p>You can create a new member status of e.g. &quot;Duplicate&quot; to isolate your dupes so they can be excluded in a search by users. You want to do this because setting to cancelled per delete membership action help pop-up doesn't seem advisable as in some cases I've seen, prevent the supporter from adding a membership via a front-end again. (may need to submit PR to change that reccomendation pop-up).</p>
  <blockquote>
  <p>WARNING: Deleting this membership will also delete any related payment
  (contribution) records. This action cannot be undone.</p>
  <p>Consider modifying the membership status instead if you want to
  maintain an audit trail and avoid losing payment data. You can set the
  status to Cancelled by editing the membership and clicking the Status
  Override checkbox.</p>
  <p>Click 'Delete' if you want to continue.</p>
  </blockquote>
  <p>To cleanup, you should identify your duplicate memberships, either manually, sorting by name / CID in a membership search or via an export to a CSV. Via CSV you should export Contact ID, Membership ID, Member Since, Membership Type, Membership Start Date. You can run a dedupe scan in the CSV to figure out the dupes and fix the data accordingly for re-import or manual intervention.</p>
  <p>Then you need to enure you move all the related contributions from the Duplicate status memberships to the surviving membership. You can use this extension to do so if you do not want to edit <code>civicrm_membership_payment</code> table directly: <a href="https://github.com/CiviCooP/org.civicoop.membershippayment" rel="nofollow noreferrer">https://github.com/CiviCooP/org.civicoop.membershippayment</a>. This moves the contribution ID(s) to the correct membership ID.</p>
  <p>After moving all related contributions from the duplicate membership it is safe to delete it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-27T20:54:25.960Z
Answers.LastActivityDate: 2022-04-27T21:06:40.877Z
Answers.LastEditDate: 2022-04-27T21:06:40.877Z
Answers.UserDisplayName: Andy Burns
Body: <p>What is the recommendation to deleting duplicate memberships. some members have at least 3 - 10 entries and we want to clean it up. please advise</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-27T19:45:25.047Z
Comments.Text: welcome - it will help you (and help us to help you) to understand why these are being created eg is it because you are merging contacts. or Memberships have been set to 'overridden' which prevents them being renewed and hence new ones are created. or something else (since this is not an Answer I am just posting as a Comment)
Comments.UserDisplayName: petednz - fuzion
Tags: <civimember><duplicate-contacts>
Title: duplicate memberships for the same member
ThreadText: # duplicate memberships for the same member
  
  (Asked by: username_0 on 2022-04-27)
  
  What is the recommendation to deleting duplicate memberships. some members have at least 3 - 10 entries and we want to clean it up. please advise
  
  **Tags:** civimember, duplicate-contacts
  
  > **Comments:**
  > **username_1**: welcome - it will help you (and help us to help you) to understand why these are being created eg is it because you are merging contacts. or Memberships have been set to 'overridden' which prevents them being renewed and hence new ones are created. or something else (since this is not an Answer I am just posting as a Comment)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-04-27. Score: 1
  
  The first step is to stop the duplicates from happening. Are the memberships all tied to the same organization? Then it should not be doing that. The cases where I've seen it create duplicates is when memberships were in a pending state (contribution failed) <https://lab.civicrm.org/dev/membership/-/issues/11>.
  
  You can create a new member status of e.g. "Duplicate" to isolate your dupes so they can be excluded in a search by users. You want to do this because setting to cancelled per delete membership action help pop-up doesn't seem advisable as in some cases I've seen, prevent the supporter from adding a membership via a front-end again. (may need to submit PR to change that reccomendation pop-up).
  
  > WARNING: Deleting this membership will also delete any related payment
  > (contribution) records. This action cannot be undone.
  >
  > Consider modifying the membership status instead if you want to
  > maintain an audit trail and avoid losing payment data. You can set the
  > status to Cancelled by editing the membership and clicking the Status
  > Override checkbox.
  >
  > Click 'Delete' if you want to continue.
  
  To cleanup, you should identify your duplicate memberships, either manually, sorting by name / CID in a membership search or via an export to a CSV. Via CSV you should export Contact ID, Membership ID, Member Since, Membership Type, Membership Start Date. You can run a dedupe scan in the CSV to figure out the dupes and fix the data accordingly for re-import or manual intervention.
  
  Then you need to enure you move all the related contributions from the Duplicate status memberships to the surviving membership. You can use this extension to do so if you do not want to edit `civicrm_membership_payment` table directly: <https://github.com/CiviCooP/org.civicoop.membershippayment>. This moves the contribution ID(s) to the correct membership ID.
  
  After moving all related contributions from the duplicate membership it is safe to delete it.
  
  
  ---
  
  