Skip to content

Conversation

@p810
Copy link

@p810 p810 commented Jun 13, 2020

Description

  • Adds Migration\Step\Eav\Helper::getKeyFromFields() to consolidate the functionality used to assemble a field key for a row, giving the action semantic meaning and making the code a little DRYer
  • Fixes the undefined index error that's thrown from Migration\Step\Eav\Data::createMapAttributeSetIds(), by adding a new property $mapNewAttributeSetsToSourceKeys which maintains a mapping of source to destination field keys (e.g. 1-Default => 1-Migration_Default)

Fixed Issues (if relevant)

  1. Undefined index: 1-Default in Migration\Step\Eav\Data on line 624 #825: Undefined index: 1-Default in Migration\Step\Eav\Data on line 624

Manual testing scenarios

  1. Run the data migration tool for a migration of Magento 1.14.4.5 to 2.3.5-p1
  2. Ensure that an exception representing an undefined index notice isn't thrown from Migration\Step\Eav\Data::createMapAttributeSetIds()

Further information can be found in #825.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)

p810 added 4 commits June 13, 2020 10:37
This functionality appears in multiple spots throughout the Eav namespace, so I added this method to make the code a little more DRY and semantic
- Adds Migration\Step\Eav\Data::$mapNewAttributeSetsToSourceKeys which maintains a mapping of array keys (e.g. 1-Default => 1-Migration_Default) to prevent an undefined index error in createMapAttributeSetIds()
- Updates Migration\Step\Eav\Data and Migration\Step\Eav\Model\Data to use Migration\Step\Eav\Helper::getKeyFromFields() wherever a field key needs to be assembled
@victor-v-rad
Copy link
Collaborator

Thank you @p810 for your contribution to the project. Internal ticket MC-35383 to process it.

@p810
Copy link
Author

p810 commented Jun 29, 2020

As @victor-v-rad mentioned in #825 this isn't a bug but was caused by a handler that got leftover in our configuration.

@p810 p810 closed this Jun 29, 2020
@ghost
Copy link

ghost commented Jun 29, 2020

Hi @p810, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants