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

Use line items to look up memberships #20495

Merged
merged 3 commits into from
Jun 7, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

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

@civibot
Copy link

civibot bot commented Jun 3, 2021

(Standard links)

@civibot civibot bot added the master label Jun 3, 2021
$membershipPayments = civicrm_api3('MembershipPayment', 'get', [
'return' => 'membership_id',
'contribution_id' => (int) $contributionID,
'contribution_id' => $contributionID,
'membership_id' => ['NOT IN' => $membershipIDs],
Copy link
Contributor

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.

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 yeah I didn't handle 'empty'

@eileenmcnaughton
Copy link
Contributor Author

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
@eileenmcnaughton
Copy link
Contributor Author

#20521 fixes the first one - checking the others

image

This still checks the membership payment but creates some noise if there are validity issues
@eileenmcnaughton
Copy link
Contributor Author

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();
Copy link
Contributor Author

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

@seamuslee001
Copy link
Contributor

Looks good to me merging

@seamuslee001 seamuslee001 merged commit 96f012e into civicrm:master Jun 7, 2021
@seamuslee001 seamuslee001 deleted the lines branch June 7, 2021 04:36
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