REF] Standardise validation of mapped fields in imports, fix over-zealous requirements when matching on trxn_id, invoice_id for update #24433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
[REF] Standardise validation of mapped fields in imports, fix excessive required fields when matching on
trxn_id
, invoice_id`Before
Validattion is still happening in multiple places & each is a bit different
Importing contributions with 'update existing' + trxn_id unnecessarily requires create fields like total_amount & financial type
After
Single place which processes an and/or array - form starts to call the parser layer
Possible to import with
trxn_id
and do an update without all create fieldsTechnical Details
This has new test cover for the Contribution import, including the
trxn_id
situation described and substantial test cover inCRM_Contact_Import_Parser_ContactTest
- in particulartestValidation
Comments