dev/core#3038 Fix handling for payment_instrument_id, cleanup financial_type_id #23586
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
This addresses https://lab.civicrm.org/dev/core/-/issues/3038
by getting rid of the non-standardness around payment_instrument_id
and financial_type_id. The two fields are now
marked as importable and we use the
real names (payment_instrument_id) rather than the
'handy-dandy' names (payment_instrument) - which means
we can simplify in a bunch of places. Also since we are
already cleaning up names in the upgrade we add these in there
Before
payment_instrument_id
andfinancial_type_id
are not marked as importable in the DAO - and insteadfinancial_type
andpayment_instrument
are hacked in viagetImportablaeFields
. However, we have lots of handling for the standard way of using the actual field name and lots of hacks to make the non-standard work - this standardises.After
The real field names are used
Technical Details
Unlike the contact version of
getImportableFields
the contribution has not been overloaded - so we can make it right for import without falloutComments
There is good test cover for these 2 fields in
CRM_Contribute_Import_Parser_ContributionTest