{"action":"created","issue":{"url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/917","repository_url":"https://api.github.com/repos/Smile-SA/elasticsuite","labels_url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/917/labels{/name}","comments_url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/917/comments","events_url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/917/events","html_url":"https://github.com/Smile-SA/elasticsuite/issues/917","id":324043218,"node_id":"MDU6SXNzdWUzMjQwNDMyMTg=","number":917,"title":"Error when we save an optimizer with from date and/or to date values","user":{"login":"PierreLeMaguer","id":19976778,"node_id":"MDQ6VXNlcjE5OTc2Nzc4","avatar_url":"https://avatars1.githubusercontent.com/u/19976778?v=4","gravatar_id":"","url":"https://api.github.com/users/PierreLeMaguer","html_url":"https://github.com/PierreLeMaguer","followers_url":"https://api.github.com/users/PierreLeMaguer/followers","following_url":"https://api.github.com/users/PierreLeMaguer/following{/other_user}","gists_url":"https://api.github.com/users/PierreLeMaguer/gists{/gist_id}","starred_url":"https://api.github.com/users/PierreLeMaguer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierreLeMaguer/subscriptions","organizations_url":"https://api.github.com/users/PierreLeMaguer/orgs","repos_url":"https://api.github.com/users/PierreLeMaguer/repos","events_url":"https://api.github.com/users/PierreLeMaguer/events{/privacy}","received_events_url":"https://api.github.com/users/PierreLeMaguer/received_events","type":"User","site_admin":false},"labels":[{"id":345730080,"node_id":"MDU6TGFiZWwzNDU3MzAwODA=","url":"https://api.github.com/repos/Smile-SA/elasticsuite/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"romainruaud","id":15340849,"node_id":"MDQ6VXNlcjE1MzQwODQ5","avatar_url":"https://avatars2.githubusercontent.com/u/15340849?v=4","gravatar_id":"","url":"https://api.github.com/users/romainruaud","html_url":"https://github.com/romainruaud","followers_url":"https://api.github.com/users/romainruaud/followers","following_url":"https://api.github.com/users/romainruaud/following{/other_user}","gists_url":"https://api.github.com/users/romainruaud/gists{/gist_id}","starred_url":"https://api.github.com/users/romainruaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainruaud/subscriptions","organizations_url":"https://api.github.com/users/romainruaud/orgs","repos_url":"https://api.github.com/users/romainruaud/repos","events_url":"https://api.github.com/users/romainruaud/events{/privacy}","received_events_url":"https://api.github.com/users/romainruaud/received_events","type":"User","site_admin":false},"assignees":[{"login":"romainruaud","id":15340849,"node_id":"MDQ6VXNlcjE1MzQwODQ5","avatar_url":"https://avatars2.githubusercontent.com/u/15340849?v=4","gravatar_id":"","url":"https://api.github.com/users/romainruaud","html_url":"https://github.com/romainruaud","followers_url":"https://api.github.com/users/romainruaud/followers","following_url":"https://api.github.com/users/romainruaud/following{/other_user}","gists_url":"https://api.github.com/users/romainruaud/gists{/gist_id}","starred_url":"https://api.github.com/users/romainruaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainruaud/subscriptions","organizations_url":"https://api.github.com/users/romainruaud/orgs","repos_url":"https://api.github.com/users/romainruaud/repos","events_url":"https://api.github.com/users/romainruaud/events{/privacy}","received_events_url":"https://api.github.com/users/romainruaud/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-05-17T14:16:25Z","updated_at":"2018-06-11T11:52:02Z","closed_at":null,"author_association":"NONE","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n\r\n### Preconditions\r\n<!--- Please Provide detailed informations about the environment you use -->\r\nThe problem occurs when we try to create/update an optimizer with non null fromdate AND todate. The back office is configure to use French date format.\r\n\r\n<!-- Magento Version : Are you using Magento CE or EE ? Which version of Magento are you using exactly ? -->\r\nMagento Version : 2.1.12\r\n\r\n<!-- ElasticSuite Version : Which exact version of ElasticSuite are you using ? -->\r\nElasticSuite Version : 2.3.11\r\n\r\n<!-- Magento Environment : are you in Developer or Production mode ? -->\r\nEnvironment : Dev and Prod\r\n\r\n### Steps to reproduce\r\n<!--- Provide a set of unambiguous steps to reproduce this bug. You can also include pieces of code if you think it's relevant  -->\r\n1. Go to the Back office\r\n2. Create an optimizer with from date and to date.\r\n\r\n### Expected result\r\n<!--- Tell us what should happen -->\r\n1. Optimizer Saved with right values on the fields from_date and to_date\r\n\r\n### Actual result\r\n<!--- Tell us what happens instead -->\r\nOptimizer not saved and error :  DateTime::__construct(): Failed to parse time string (23/05/2018) at position 0 (2): Unexpected character\r\nException #0 (Exception): DateTime::__construct(): Failed to parse time string (23/05/2018) at position 0 (2): Unexpected character\r\n#0 /var/www/algam/vendor/smile/elasticsuite/src/module-elasticsuite-catalog-optimizer/Model/Optimizer.php(289): DateTime->__construct('23/05/2018')\r\n#1 /var/www/algam/vendor/smile/elasticsuite/src/module-elasticsuite-catalog-optimizer/Controller/Adminhtml/Optimizer/Save.php(55): Smile\\ElasticsuiteCatalogOptimizer\\Model\\Optimizer->validateData(Object(Magento\\Framework\\DataObject))\r\n#2 /var/www/algam/var/generation/Smile/ElasticsuiteCatalogOptimizer/Controller/Adminhtml/Optimizer/Save/Interceptor.php(24): Smile\\ElasticsuiteCatalogOptimizer\\Controller\\Adminhtml\\Optimizer\\Save->execute()\r\n#3 /var/www/algam/vendor/magento/framework/App/Action/Action.php(102): Smile\\ElasticsuiteCatalogOptimizer\\Controller\\Adminhtml\\Optimizer\\Save\\Interceptor->execute()\r\n#4 /var/www/algam/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\\Framework\\App\\Action\\Action->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\r\n#5 /var/www/algam/vendor/magento/framework/Interception/Interceptor.php(74): Magento\\Backend\\App\\AbstractAction->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\r\n#6 /var/www/algam/vendor/magento/framework/Interception/Chain/Chain.php(70): Smile\\ElasticsuiteCatalogOptimizer\\Controller\\Adminhtml\\Optimizer\\Save\\Interceptor->___callParent('dispatch', Array)\r\n#7 /var/www/algam/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\\Framework\\Interception\\Chain\\Chain->invokeNext('Smile\\\\Elasticsu...', 'dispatch', Object(Smile\\ElasticsuiteCatalogOptimizer\\Controller\\Adminhtml\\Optimizer\\Save\\Interceptor), Array, 'adminAuthentica...')\r\n1. [Screenshot, logs]\r\n\r\n<!--- (This may be platform independent comment) -->\r\nOne solution I found: /home/pilem/Travail/SmileProject/algam/vendor/smile/elasticsuite/src/module-elasticsuite-catalog-optimizer/Model/Optimizer.php:l288-289 -> replace new \\DateTime() by $this->dateFilter->filter()"},"comment":{"url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/comments/396216844","html_url":"https://github.com/Smile-SA/elasticsuite/issues/917#issuecomment-396216844","issue_url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/917","id":396216844,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjIxNjg0NA==","user":{"login":"afoucret","id":529238,"node_id":"MDQ6VXNlcjUyOTIzOA==","avatar_url":"https://avatars0.githubusercontent.com/u/529238?v=4","gravatar_id":"","url":"https://api.github.com/users/afoucret","html_url":"https://github.com/afoucret","followers_url":"https://api.github.com/users/afoucret/followers","following_url":"https://api.github.com/users/afoucret/following{/other_user}","gists_url":"https://api.github.com/users/afoucret/gists{/gist_id}","starred_url":"https://api.github.com/users/afoucret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afoucret/subscriptions","organizations_url":"https://api.github.com/users/afoucret/orgs","repos_url":"https://api.github.com/users/afoucret/repos","events_url":"https://api.github.com/users/afoucret/events{/privacy}","received_events_url":"https://api.github.com/users/afoucret/received_events","type":"User","site_admin":false},"created_at":"2018-06-11T11:52:02Z","updated_at":"2018-06-11T11:52:02Z","author_association":"MEMBER","body":"That would be fine !!!"}}
{"actor":{"display_login":"afoucret"}}