-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Make Order api easier to use for default price set #20681
Conversation
(Standard links)
|
ee88250
to
2ba1078
Compare
failed tests - looks like some notices CRM_Contribute_BAO_ContributionTest.testcheckLineItems |
d074197
to
95d8a7c
Compare
Test Result (10 failures / ±0) |
@@ -820,8 +820,6 @@ public function testcheckLineItems() { | |||
$e->getMessage() | |||
); | |||
} | |||
|
|||
$this->assertEquals(3, $params['line_items'][0]['line_item'][0]['financial_type_id']); |
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.
No longer done in the same low-level function (which I intend to remove anyway soon)
95d8a7c
to
d5e647c
Compare
Test Result (6 failures / -14) |
d5e647c
to
92013f2
Compare
Test Result (5 failures / +5)api_v3_OrderTest.testAddOrderForParticipantapi_v3_OrderTest.testOrderWithMixedTaxCRM_Contribute_BAO_ContributionTest.testAllowUpdateRevenueRecognitionDateCivi.Financialacls.LineItemTest.testLineItemApiPermissions with data set "APIv3"Civi.Financialacls.LineItemTest.testLineItemApiPermissions with data set "APIv4" |
92013f2
to
45a2835
Compare
This changes the order api so that it is not necessary to figure out the details of the default price set when using it to create memberships.
45a2835
to
ca44bb7
Compare
@monishdeb this is the one I'm most blocked by |
Sorry for the delay.
|
Yay thanks @monishdeb - I really rely on your for these gnarly ones |
@eileenmcnaughton I am testing 5.43-RC Using Order API I now get
This should have 'broken' in 5.40 - but I cannot trace what other change could have caused this. Any insight? |
I am also testing on other sites just in case this is a single site issue. |
@kcristiano thanks - please log a gitlab when you figure out more |
Just closing the loop - This commit 68a5e5f#diff-0b698309cd442a1ff2983c207f0576b2bdd8d98b2693ae1e0661a417c209de4e Required a change in our API code - I am amazed it did not affect all sites we had upgraded, but not a regression, we just had to pass new params to the order api. |
Overview
This changes the order api so that it is not necessary to figure out the details
of the default price set when using it to create memberships.
I was digging into places where line items are not adequately set by the time they reach the inner workings on Contribution.create and they seem to be mostly coming from the unit tests and it's kinda painful to replace them with order.create when we have to calculate so many fields to use it - this reduces the required parameters when relying on the default price set for memberships
Before
After
Technical Details
Comments