Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-2037

Can't delete membership if it has a required custom field

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: CiviMember
    • Labels:
      None

      Description

      If a membership has a required custom field, then it can not be deleted because an error message appears saying "<Name of field> is a required field"

      To recreate on the demo:
      1. Create a custom field group that applies to memberships and is required (On the demo currently there is one called 'Region')
      2. Find a contact and add new membership and set fill the required custom field with a value.
      3. On the contact's Membership tab, click the 'delete' link of the new membership.
      4. Confirm that you want to delete the membership.

      Observe the following error message which appears and note that the membership is not deleted:
      "Please correct the following errors in the form fields below:

      • Region is a required field."

      Desired behaviour is to delete the membership record, without performing validation on the values (i.e. even if the required field didn't have a value, the membership should still be deletable)

        Attachments

          Activity

            People

            • Assignee:
              shailesh Shailesh Lende
              Reporter:
              chrism Chris Mott
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: