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

[Ref] [Import] more code cleanup #15219

Merged
merged 2 commits into from
Sep 5, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Removes code complexity that is not longer required

Before

Less readable

After

More readable

Technical Details

Builds off #15218

Comments

@civibot
Copy link

civibot bot commented Sep 5, 2019

(Standard links)

@civibot civibot bot added the master label Sep 5, 2019
jsSet is always TRUE when if ([] != ts('- do not import -')) {

so we don't need it
@@ -70,7 +70,7 @@ class CRM_Contact_Import_Form_MapField extends CRM_Import_Form_MapField {
public function defaultFromColumnName($columnName, $patterns) {

if (!preg_match('/^[a-z0-9 ]$/i', $columnName)) {
if ($columnKey = array_search($columnName, $this->_mapperFields)) {
if ($columnKey = array_search($columnName, $this->getFieldTitles())) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • makes it testable

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 @colemanw this is pretty trivial + tested

@seamuslee001
Copy link
Contributor

makes sense and we have a good solid set of unit tests for this area merging

@seamuslee001 seamuslee001 merged commit 802b6da into civicrm:master Sep 5, 2019
@seamuslee001 seamuslee001 deleted the import_next branch September 5, 2019 21:53
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