{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/4291","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/4291/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/4291/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/4291/events","html_url":"https://github.com/magento/magento2/issues/4291","id":150875030,"number":4291,"title":"Customer Import - Invalid data for insert","user":{"login":"zinittest","id":16776106,"avatar_url":"https://avatars0.githubusercontent.com/u/16776106?v=3","gravatar_id":"","url":"https://api.github.com/users/zinittest","html_url":"https://github.com/zinittest","followers_url":"https://api.github.com/users/zinittest/followers","following_url":"https://api.github.com/users/zinittest/following{/other_user}","gists_url":"https://api.github.com/users/zinittest/gists{/gist_id}","starred_url":"https://api.github.com/users/zinittest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zinittest/subscriptions","organizations_url":"https://api.github.com/users/zinittest/orgs","repos_url":"https://api.github.com/users/zinittest/repos","events_url":"https://api.github.com/users/zinittest/events{/privacy}","received_events_url":"https://api.github.com/users/zinittest/received_events","type":"User","site_admin":false},"labels":[{"id":429635121,"url":"https://api.github.com/repos/magento/magento2/labels/2.0.x","name":"2.0.x","color":"fbca04","default":false},{"id":429635502,"url":"https://api.github.com/repos/magento/magento2/labels/2.1.x","name":"2.1.x","color":"fbca04","default":false},{"id":21716835,"url":"https://api.github.com/repos/magento/magento2/labels/acknowledged","name":"acknowledged","color":"02d7e1","default":false},{"id":147131376,"url":"https://api.github.com/repos/magento/magento2/labels/bug%20report","name":"bug report","color":"d93f0b","default":false},{"id":375320504,"url":"https://api.github.com/repos/magento/magento2/labels/Import/Export","name":"Import/Export","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-04-25T14:13:19Z","updated_at":"2017-05-24T14:50:48Z","closed_at":null,"body":"## Steps to reproduce\n1. Create CSV file for customer import with two rows: first - all columns filled with dummy content, second - without gender or dob data (example attached). \n   [test_main.csv.zip](https://github.com/magento/magento2/files/234674/test_main.csv.zip)\n2. Choose \"Customers Main File\", \"Add/Update Complex Data\" options. \n3. Hit \"Check Data\" button - validation should be OK. \n4. Hit \"Import\" button.\n## Expected result\n1. Customer data imported to the shop.\n## Actual result\n1. Error message appears: \"Invalid data for insert\".\n\nP. S. Error occurs because data rows which are going to be inserted have different keys (https://github.com/magento/magento2/blob/develop/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php#L1878). It happens because fields with empty values are discarded during data preparation step (https://github.com/magento/magento2/blob/develop/app/code/Magento/CustomerImportExport/Model/Import/Customer.php#L373). I was able to import data just commenting these lines, but obviously it requires more proper fix. \n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/303748129","html_url":"https://github.com/magento/magento2/issues/4291#issuecomment-303748129","issue_url":"https://api.github.com/repos/magento/magento2/issues/4291","id":303748129,"user":{"login":"uTosTan","id":3826155,"avatar_url":"https://avatars3.githubusercontent.com/u/3826155?v=3","gravatar_id":"","url":"https://api.github.com/users/uTosTan","html_url":"https://github.com/uTosTan","followers_url":"https://api.github.com/users/uTosTan/followers","following_url":"https://api.github.com/users/uTosTan/following{/other_user}","gists_url":"https://api.github.com/users/uTosTan/gists{/gist_id}","starred_url":"https://api.github.com/users/uTosTan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uTosTan/subscriptions","organizations_url":"https://api.github.com/users/uTosTan/orgs","repos_url":"https://api.github.com/users/uTosTan/repos","events_url":"https://api.github.com/users/uTosTan/events{/privacy}","received_events_url":"https://api.github.com/users/uTosTan/received_events","type":"User","site_admin":false},"created_at":"2017-05-24T14:50:48Z","updated_at":"2017-05-24T14:50:48Z","body":"The issue is still there in v2.1.5. Commit https://github.com/magento/magento2/commit/487ae24056c189c63eb4427f2a5858890544e092 fixed the issue for me."}}
{"actor":{"display_login":"uTosTan"}}