Contribution import - tests & fixes on dates, amount
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 4 Jun 2022 03:32:08 +0000 (15:32 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sat, 4 Jun 2022 22:14:19 +0000 (10:14 +1200)
commit4b58c5c4208a89800bb361840f8c442378cd19a3
tree01eb5528f6bb54757b10a4bddb635de030928c2c
parent77a9ae2474f9151ca94841ec8f83008bf7551f5f
Contribution import - tests & fixes on dates, amount

Fixes inconsistent  amount handling - these
are issues that I found through writing unit tests to cover them
The money handling was permitting amounts where the
decimal separator was before the thousand. On the dates
there was a format being handled for some fields
but not others
14 files changed:
CRM/Activity/Import/Parser/Activity.php
CRM/Contact/Import/Parser/Contact.php
CRM/Contribute/Import/Form/MapField.php
CRM/Contribute/Import/Parser/Contribution.php
CRM/Custom/Import/Parser/Api.php
CRM/Event/Import/Parser/Participant.php
CRM/Import/Parser.php
CRM/Member/Import/Parser/Membership.php
CRM/Utils/Rule.php
api/v3/utils.php
tests/phpunit/CRM/Contribute/Import/Parser/ContributionTest.php
tests/phpunit/CRM/Contribute/Import/Parser/data/contributions_amount_validate.csv [new file with mode: 0644]
tests/phpunit/CRM/Contribute/Import/Parser/data/contributions_date_validate.csv [new file with mode: 0644]
tests/phpunit/CiviTest/CiviUnitTestCase.php