{"action":"created","issue":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3756","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3756/labels{/name}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3756/comments","events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3756/events","html_url":"https://github.com/PrestaShop/PrestaShop/pull/3756","id":102121275,"number":3756,"title":"[-] BO: Fix product import dates","user":{"login":"gskema","id":5542423,"avatar_url":"https://avatars.githubusercontent.com/u/5542423?v=3","gravatar_id":"","url":"https://api.github.com/users/gskema","html_url":"https://github.com/gskema","followers_url":"https://api.github.com/users/gskema/followers","following_url":"https://api.github.com/users/gskema/following{/other_user}","gists_url":"https://api.github.com/users/gskema/gists{/gist_id}","starred_url":"https://api.github.com/users/gskema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gskema/subscriptions","organizations_url":"https://api.github.com/users/gskema/orgs","repos_url":"https://api.github.com/users/gskema/repos","events_url":"https://api.github.com/users/gskema/events{/privacy}","received_events_url":"https://api.github.com/users/gskema/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-20T11:43:37Z","updated_at":"2015-08-20T16:12:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/3756","html_url":"https://github.com/PrestaShop/PrestaShop/pull/3756","diff_url":"https://github.com/PrestaShop/PrestaShop/pull/3756.diff","patch_url":"https://github.com/PrestaShop/PrestaShop/pull/3756.patch"},"body":"At product import, this is what happens:\r\n\r\n- New product is initialized\r\n- `date_add` is filled with default value\r\n- `date_add` is filled in from CSV (if available)\r\n- at this point, `date_add` is ALWAYS set for new products\r\n- At `AdminImportController::productImport@Line1642` : \r\n```\r\n                    if (isset($product->date_add) && $product->date_add != '') {\r\n                        $res = $product->add(false);\r\n```\r\nThis always passes (see point above). However, `date_upd` is `''`, and it is saved in database as `0000-00-00 00:00:00`.\r\n\r\nNext time you try to import this CSV (using references), the validation doesn't pass on `date_upd`.\r\n\r\nTest file I'm using `https://copy.com/F1opx2EjEQcsCR6C`. Too bad `1.6.1.1` is already released :)"},"comment":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/comments/133063457","html_url":"https://github.com/PrestaShop/PrestaShop/pull/3756#issuecomment-133063457","issue_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/3756","id":133063457,"user":{"login":"xGouley","id":12794114,"avatar_url":"https://avatars.githubusercontent.com/u/12794114?v=3","gravatar_id":"","url":"https://api.github.com/users/xGouley","html_url":"https://github.com/xGouley","followers_url":"https://api.github.com/users/xGouley/followers","following_url":"https://api.github.com/users/xGouley/following{/other_user}","gists_url":"https://api.github.com/users/xGouley/gists{/gist_id}","starred_url":"https://api.github.com/users/xGouley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xGouley/subscriptions","organizations_url":"https://api.github.com/users/xGouley/orgs","repos_url":"https://api.github.com/users/xGouley/repos","events_url":"https://api.github.com/users/xGouley/events{/privacy}","received_events_url":"https://api.github.com/users/xGouley/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T16:12:42Z","updated_at":"2015-08-20T16:12:42Z","body":"Hello, Thank you for your contribution, I validate the PR.\r\nIt will be merged soon, but I will ask on which branch we'll do that.\r\n:+1: "}}