Call apiv4 from Contribution create rather than fugly addActivity function
authoreileen <emcnaughton@wikimedia.org>
Sat, 18 Jul 2020 02:02:47 +0000 (14:02 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 20 Jul 2020 19:39:54 +0000 (07:39 +1200)
commit6e902643f72c1e215dbdd04e15e99148c2f9706e
treeec731720b2c22578ae12eb0d13fb14b3c79183b8
parenta461078d1ec9e1f0d1ead49b408528681dc7cff8
Call apiv4 from Contribution create rather than fugly addActivity function

I took a look at https://github.com/civicrm/civicrm-core/pull/17274 which has blocking test failures - but felt that
the shared function was adding nothing and simply using the api to create the activity made more sense. The
shared function does a lot of silly wrangling for very little shared functionality and is
hard to read. In this call only 2 params are passed in - so most of the wranglingg
doesn't apply anyway. I ensured the 2 JIRA issues referenced in the removed code have test cover (one already
had a test written by Monish & I added in the campaign check
CRM/Contribute/BAO/Contribution.php
tests/phpunit/CRM/Contribute/BAO/ContributionTest.php