-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Use line items to look up memberships #20495
Conversation
(Standard links)
|
CRM/Contribute/BAO/Contribution.php
Outdated
$membershipPayments = civicrm_api3('MembershipPayment', 'get', [ | ||
'return' => 'membership_id', | ||
'contribution_id' => (int) $contributionID, | ||
'contribution_id' => $contributionID, | ||
'membership_id' => ['NOT IN' => $membershipIDs], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing it is complaining about this but not 100% sure.
@seamuslee001 yeah I didn't handle 'empty' |
I'll dig into these tests - not sure if they are real (pre-existing) bugs or just bad test set up |
This addresses a poor set up issue where the membership + contribution was being set up incorrectly & hence the line items were wrong, along with the ability to validate the financials. It was blocking civicrm#20495 along with the efforts to get financial validation on all tests
#20521 fixes the first one - checking the others |
This still checks the membership payment but creates some noise if there are validity issues
Fix for civicrm#20495 - resolve invalid test config
OK - the fails seem to be entirely issues with the tests not creating things in a way that valid contribution membership orders are created |
@@ -145,7 +158,6 @@ public function testAddPaymentUsingCreditCardForPartiallyPaidContribution() { | |||
|
|||
$mut->stop(); | |||
$mut->clearMessages(); | |||
$this->validateAllPayments(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed as now in tearDown for the whole class
Looks good to me merging |
Overview
Use line items to look up memberships
Before
Checks (deprecated) membership payments
After
Checks line items, still checks membership payments & adds them in as a deprecated temporary behaviour
Technical Details
This still checks the membership payment but creates some noise if there are validity issues
Comments
@seamuslee001 as suggested - note there are many tests you can step through this with - eg in the PaypalIPNTest class