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#2206 Move cancel pledge into Contribution.create and fix #19289

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Dec 30, 2020

Overview

dev/core#2206 Move cancel pledge into Contribution.create and fix

Before

Cancelling (or failing) a contribution does not properly update the pledge payment, such that it can have a new contribution added to it.

After

When the contribution is cancelled the contribution id is removed from any pledge payments, they are updated to be pending again & actual_amount is unset

Technical Details

Per https://lab.civicrm.org/dev/core/-/issues/2206 I think updating pledge payments is a data issue
rather than a business process issue. Notably you can't record a new contribution against the pledge
unless the existing one is removed

Comments

This is the last thing that needs to be done before we can unhide contributioncancelactions

@civibot
Copy link

civibot bot commented Dec 30, 2020

(Standard links)

Per https://lab.civicrm.org/dev/core/-/issues/2206 I think updating pledge payments is a data issue
rather than a business process issue. Notably you can't record a new contribution against the pledge
unless the existing one is removed

This is the last thing that needs to be done before we can unhide contributioncancelactions
@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 @mattwire with the Pledge & PledgePayment apis now merged this is passing. It is the last thing I think we need to do before unhiding contributioncancelactions

@eileenmcnaughton
Copy link
Contributor Author

@monishdeb @JoeMurray this is a PR that would be good to get reviewed if possible - it's the penultimate PR for issue 2206

@monishdeb
Copy link
Member

I have reviewed the patch and run on my local. Looks good to me. It updates the pledge payment with Pending status. The added Unit Test successfully captures the cancellation process.

@eileenmcnaughton I was thinking without disconnecting the contribution, will it be better to to still keep the mapping for historical reference, in a way that it doesn't affect the instalment?

@eileenmcnaughton
Copy link
Contributor Author

@monishdeb that feels like a scope creep that I would probably leave well enough alone unless we get a request

@monishdeb
Copy link
Member

Agree. Well then I am happy to merge this PR, as it rightfully moves the pledge payment processing code as a result of cancelling the associated contribution, inside Contribution.create.

@monishdeb monishdeb merged commit ee6fdea into civicrm:master Feb 2, 2021
@eileenmcnaughton eileenmcnaughton deleted the cancel branch February 2, 2021 04:41
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Feb 2, 2021
With civicrm#19289 merged we
can now unhide this extension & people can disable it if they wish (as a
supported option)
@eileenmcnaughton
Copy link
Contributor Author

I've added a PR to unhide this - the last step to resolve https://lab.civicrm.org/dev/core/-/issues/2206

eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Feb 2, 2021
With civicrm#19289 merged we
can now unhide this extension & people can disable it if they wish (as a
supported option)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants