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

CRM-21612: Membership Payment not recorded for recurring contribution… #11465

Merged
merged 1 commit into from
Jan 2, 2018

Conversation

jitendrapurohit
Copy link
Contributor

@jitendrapurohit jitendrapurohit commented Dec 29, 2017

… when status label is changed

Overview

Membership Payment not recorded for recurring contribution when contribution status is changed.

Before

When a Pending contribution label is changed, recurring contribution done through a payment processor does not link to the membership.

After

Membership Payment is recorded correctly.

Technical Details

Due to label present in $statuses, the returned $result does not contain a value for payment_status_id, which do not create any membership contribution for the contact.

Comments

Added unit test.


@seamuslee001
Copy link
Contributor

(CiviCRM Review Template WORD-1.0)

@colemanw
Copy link
Member

Anyone able to run this?

@mattwire
Copy link
Contributor

As the default machine names/labels for contribution_status are the same for english language this will only have broken for non english installs. The fix looks correct, $statuses is only used within that function and if a match is not found payment_status_id will not be set. So this fix should make no difference for english installs, but should fix an issue for non-english installs. Note this may also explain why there is limited understanding of whether membership actually renews when a contribution is updated, as it has not been working for the last 2 years if you don't run CiviCRM in english!

@jitendrapurohit
Copy link
Contributor Author

Note that this fails for english installs too, IF the default label is being changed. I've fixed this for a client using English site where Pending contribution status label was Pending or free trial.

As this may not be the most common case, I've tagged the JIRA as Minor as it only affects the site with non-default contribution status name. But just don't want this patch to be considered as the fix for only non-english installation :-).

@mattwire
Copy link
Contributor

@jitendrapurohit Yes :-)

@eileenmcnaughton
Copy link
Contributor

I'm merging this - I feel the code is clear enough that the test coverage + Jitendra's own testing is clear enough.

@eileenmcnaughton eileenmcnaughton merged commit ba5adda into civicrm:master Jan 2, 2018
@jitendrapurohit jitendrapurohit deleted the CRM-21612 branch January 2, 2018 03:32
sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21612: Membership Payment not recorded for recurring contribution…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants