compucorp / uk.co.compucorp.membershipextras

Membership Extras for CiviCRM
Other
5 stars 8 forks source link

MAE-684: Prevent user from user selecting membership type with different period and duration #423

Closed olayiwola-compucorp closed 2 years ago

olayiwola-compucorp commented 2 years ago

Overview

This PR prevents a user from selecting membership types with different period type and duration unit. should in case a user selects multiple membership types with different period type or different unit the following error is displayed You have selected membership types with different period types (i.e. rolling and fixed) and/or different duration units. Please only select memberships with the same period types and duration units.

Before

Error All membership types must have a same period type. is only displayed when multiple membership types with different period types are selected.

After

The new error message is displayed when multiple membership types with different period types or different duration units are selected. b

jamienovick commented 2 years ago

@olayiwola-compucorp possibly this isn't the correct video for this? ;)

olayiwola-compucorp commented 2 years ago

@olayiwola-compucorp possibly this isn't the correct video for this? ;) yes, I selected the wrong file, it's corrected now. @jamienovick

jamienovick commented 2 years ago

@olayiwola-compucorp can you also test and check that if you change the payment method and/or other items on the form the validation rule still runs? With the previous iteration I think there was a bug and this could be submitted in this case.

olayiwola-compucorp commented 2 years ago

@olayiwola-compucorp can you also test and check that if you change the payment method and/or other items on the form the validation rule still runs? With the previous iteration I think there was a bug and this could be submitted in this case.

@jamienovick this particular validation also runs in the backend after the user submits the form.

olayiwola-compucorp commented 2 years ago

Merging this into the feature branch, I will make a new PR to the workstream branch with updates.