[REF] Simplify activity import validation
authoreileen <emcnaughton@wikimedia.org>
Tue, 12 Jan 2021 07:55:15 +0000 (20:55 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 18 Jan 2021 20:09:31 +0000 (09:09 +1300)
commitc5a8afa59088ca765ee1c1045a03cfaf687f7ea0
tree75e3afb29e18e9ac855770db217323ca3201be82
parent459192b042d83d44400c22590e5017a3e7aa7a00
[REF] Simplify activity import validation

There are 2 types of validation on importing
1) the correct fields have been mapped
2) the specific row has all the required fields

These generally live in different places
- field mapping is validated on the MapField::formRule validation function
- the specific row is validated in the (badly named) 'summary' function.

However, the second function is also doing some validation of the
mapping, checking that either activity_type_id or label is mapped
& ditto activity_date_time. This duplicates the MapField rule
and is hard to read, while making a larger cleanup difficult
CRM/Activity/Import/Form/MapField.php
CRM/Activity/Import/Parser/Activity.php