Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#3038 Fix handling for payment_instrument_id, cleanup financial_type_id #23586

Merged
merged 1 commit into from
May 29, 2022

Conversation

eileenmcnaughton
Copy link
Contributor

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 and financial_type_id are not marked as importable in the DAO - and instead financial_type and payment_instrument are hacked in via getImportablaeFields. 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 fallout

image

Comments

There is good test cover for these 2 fields in CRM_Contribute_Import_Parser_ContributionTest

@civibot
Copy link

civibot bot commented May 25, 2022

(Standard links)

@civibot civibot bot added the master label May 25, 2022
@eileenmcnaughton
Copy link
Contributor Author

Just noting I did an r-run on this & confirmed updates are possible per
dev/core#3038 - I did spot some other nastiness

…al_type_id

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
@colemanw
Copy link
Member

Cleanup looks good and has good test coverage.

@colemanw colemanw merged commit 6b13833 into civicrm:master May 29, 2022
@colemanw colemanw deleted the import_mem branch May 29, 2022 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants