Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: 4.3.0
-
Component/s: None
-
Labels:None
Description
Define flag which causes contribution create api to bypass creation of default line_item record:
skipLineItem => 1
Default for this flag is FALSE, and is set in _contribution_create_spec
Update api_v3_ContributionTest which were using use_default_price_set=0 flag so they set the new skipLineItem flag to 1. This should allow those failing tests to succeed again.
— Original Post —
Not sure exactly the correct behaviour but the original api set up determined that it should be possible to create a contribution with line items by chaining them - per test
ContributionTest.php::testCreateContributionChainedLineItems
This now fails because an extra line item is created. There are a bunch of other tests on the same class which seem intended to test CiviAccounts API behaviour that has either changed or is broken.
I think it's important that it is possible to create a contribution with specified line items - even if the approach of using Chaining to achieve that isn't retained.