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

[Import] [ref] - minor cleanup to reduce code complexity #15097

Merged
merged 2 commits into from
Aug 23, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Use Processor to determine the phone_type_id & im_provider_id + add a test

Before

Code more crazy, less tested

After

Less crazy, more tested

Technical Details

What we are doing here is actually very simple - despite the code being kinda insane - we are just getting the fields from the database for each column in the mapping.

The fields are all loaded into the processor already & those functions are tested. This switches to using them and to passing around less variables...

Follow ons will do the same for other fields (website_type_id, location_type_id but I will add more tests as I do that

Comments

@civibot
Copy link

civibot bot commented Aug 22, 2019

(Standard links)

@seamuslee001
Copy link
Contributor

@eileenmcnaughton test fail relates

What we are doing here is actually very simple - despite the code being kinda insane - we are just getting
the  fields from the database for  each column in the mapping.

The fields are all loaded into the processor already & those functions are tested. This switches to  using them
and to passing around less variables...

Follow ons will do the same for other fields (website_type_id, location_type_id but I will add more tests as I do that
@eileenmcnaughton eileenmcnaughton merged commit 5c6fd6e into civicrm:master Aug 23, 2019
@eileenmcnaughton eileenmcnaughton deleted the import_cleanup branch August 23, 2019 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants