{"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://avatars.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":[{"url":"https://api.github.com/repos/magento/magento2/labels/2.0.x","name":"2.0.x","color":"fbca04"},{"url":"https://api.github.com/repos/magento/magento2/labels/2.1.x","name":"2.1.x","color":"fbca04"},{"url":"https://api.github.com/repos/magento/magento2/labels/acknowledged","name":"acknowledged","color":"02d7e1"},{"url":"https://api.github.com/repos/magento/magento2/labels/bug%20report","name":"bug report","color":"d93f0b"},{"url":"https://api.github.com/repos/magento/magento2/labels/Import/Export","name":"Import/Export","color":"1d76db"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-04-25T14:13:19Z","updated_at":"2016-09-16T18:10:05Z","closed_at":null,"body":"Steps to reproduce\r\n--\r\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). \r\n[test_main.csv.zip](https://github.com/magento/magento2/files/234674/test_main.csv.zip)\r\n2. Choose \"Customers Main File\", \"Add/Update Complex Data\" options. \r\n2. Hit \"Check Data\" button - validation should be OK. \r\n3. Hit \"Import\" button.\r\n\r\nExpected result\r\n--\r\n1. Customer data imported to the shop.\r\n\r\nActual result\r\n--\r\n1. Error message appears: \"Invalid data for insert\".\r\n\r\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. "},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/247669119","html_url":"https://github.com/magento/magento2/issues/4291#issuecomment-247669119","issue_url":"https://api.github.com/repos/magento/magento2/issues/4291","id":247669119,"user":{"login":"BaDos","id":1080178,"avatar_url":"https://avatars.githubusercontent.com/u/1080178?v=3","gravatar_id":"","url":"https://api.github.com/users/BaDos","html_url":"https://github.com/BaDos","followers_url":"https://api.github.com/users/BaDos/followers","following_url":"https://api.github.com/users/BaDos/following{/other_user}","gists_url":"https://api.github.com/users/BaDos/gists{/gist_id}","starred_url":"https://api.github.com/users/BaDos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaDos/subscriptions","organizations_url":"https://api.github.com/users/BaDos/orgs","repos_url":"https://api.github.com/users/BaDos/repos","events_url":"https://api.github.com/users/BaDos/events{/privacy}","received_events_url":"https://api.github.com/users/BaDos/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T18:10:05Z","updated_at":"2016-09-16T18:10:05Z","body":"Hi @EL-Nazer \r\n\r\nWe are working on this issue."}}
{"actor":{"display_login":"BaDos"}}