Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#1331 Don't freeze fields for auto-renew memberships #16609

Merged
merged 2 commits into from
Mar 20, 2020

Conversation

wmortada
Copy link
Contributor

@wmortada wmortada commented Feb 21, 2020

Overview

If a membership is set to auto-renew some of the fields are frozen, which means that a user is unable to edit them when they visit the edit membership screen.

This PR changes this behaviour so that these fields are NOT frozen. The membership organisation/type field is initially disabled but with the option to enable this field and edit it. The membership status field has the option to override as per non auto-renew memberships.

Warning messages have been added to alert the user to the consequence of changing these membership details.

See https://lab.civicrm.org/dev/core/issues/1331 for more details and discussion.

Before

If the membership is set to auto-renew, the following fields are frozen:

  • Membership organisation / Membership type
  • Membership status

image

If the payment processor supports cancelling automatic renewal there is a text alert with the option to cancel:

image

(If the payment processor doesn't support cancelling automatic renewal this alert doesn't show.)

After

If the membership is set to auto-renew the fields are not frozen and the user has the ability to override them if required. Help text with an appropriate warning is displayed.

image

If the payment processor supports cancelling automatic renewal there is an option to do so (within the alert):

image

Technical Details

None.

Comments

This replaces a previous PR #16322

I have created an extension that restores the current functionality for sites that need it: https://lab.civicrm.org/extensions/freeze-membership-fields

The end date field was unfrozen in #15540. See https://lab.civicrm.org/dev/core/issues/1126 for details.

@civibot
Copy link

civibot bot commented Feb 21, 2020

(Standard links)

@mattwire
Copy link
Contributor

mattwire commented Mar 5, 2020

@wmortada I tested this on a 5.21 site and could not submit the "Edit membership" form without clicking "Override organization and type". I did not need to change the actual selections. But without clicking I got an error that they were required.

@mattwire mattwire added the needs-work-not-review-ready Submitter required to take action, will be closed after 1-2 weeks in this state label Mar 5, 2020
@wmortada
Copy link
Contributor Author

wmortada commented Mar 5, 2020

Thanks @mattwire. I'll take a look.

@wmortada
Copy link
Contributor Author

wmortada commented Mar 6, 2020

@mattwire try this now

@wmortada
Copy link
Contributor Author

wmortada commented Mar 6, 2020

If you think it looks okay, I can create a new PR to tidy up the commits.

@mattwire mattwire added merge ready PR will be merged after a few days if there are no objections and removed needs-work-not-review-ready Submitter required to take action, will be closed after 1-2 weeks in this state labels Mar 6, 2020
@mattwire mattwire changed the title (WIP) dev/core#1331 Don't freeze fields for auto-renew memberships dev/core#1331 Don't freeze fields for auto-renew memberships Mar 6, 2020
@mattwire
Copy link
Contributor

mattwire commented Mar 6, 2020

I have r-run this and believe it is now ok to merge - @wmortada please squash the commits and I'll merge in a few days if no-one objects!

@mattwire mattwire merged commit 0a70c96 into civicrm:master Mar 20, 2020
@mattwire
Copy link
Contributor

@wmortada thanks for persevering with this!

@wmortada
Copy link
Contributor Author

Hurray! Thanks @mattwire. It only took 8 months!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants