{"action":"created","comment":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments/66281204","id":66281204,"diff_hunk":"@@ -0,0 +1,116 @@\n+<?php\n+\n+namespace Pim\\Behat\\Decorator\\Export\\Filter;\n+\n+use Behat\\Mink\\Element\\NodeElement;\n+use Context\\Spin\\SpinCapableTrait;\n+use Pim\\Behat\\Decorator\\ElementDecorator;\n+\n+/**\n+ * Export Builder - Decorator for the filter \"Updated time condition\"\n+ */\n+class UpdatedTimeConditionDecorator extends ElementDecorator\n+{\n+    use SpinCapableTrait;\n+\n+    /** @var array */\n+    private $elements = [\n+        'updated_since_strategy' => [\n+            'css'        => '.select2-container',\n+            'decorators' => ['Pim\\Behat\\Decorator\\Field\\Select2Decorator'],\n+        ],\n+        'updated_since_date' => [\n+            'css'        => '.exported-since-date-wrapper input',\n+            'decorators' => ['Pim\\Behat\\Decorator\\Field\\DatepickerDecorator'],\n+        ],\n+        'updated_since_n_days' => [\n+            'css' => '.exported-since-n-days-wrapper input',\n+        ],\n+    ];\n+\n+    /**\n+     * Set the value of the filter\n+     *\n+     * @param string $expectedOperatorValue\n+     * @param string $expectedFilterValue\n+     */\n+    public function setValue($expectedOperatorValue, $expectedFilterValue)\n+    {\n+        $operator = $this->getElement('updated_since_strategy');\n+        $operator->setValue($expectedOperatorValue);\n+\n+        $filterValueElement = $this->getFilterValueElement($operator);\n+        $filterValueElement->setValue($expectedFilterValue);\n+    }\n+\n+    /**\n+     * Check if the operator and the value of the filter are valid\n+     *\n+     * @param string $expectedOperatorValue\n+     * @param string $expectedFilterValue\n+     *\n+     * @throws \\Exception\n+     */\n+    public function validate($expectedOperatorValue, $expectedFilterValue)\n+    {\n+        $operator = $this->getElement('updated_since_strategy');\n+        $operatorOptionValue = $operator->getOptionLabel();\n+        if ($expectedOperatorValue !== $operatorOptionValue) {\n+            throw new \\Exception(\n+                sprintf(\n+                    'The value of operator does not contain \"%s\" but \"%s\"',\n+                    $expectedOperatorValue,\n+                    $operatorOptionValue\n+                )\n+            );\n+        }\n+\n+        $filterValue = $this->getFilterValueElement($operator)->getValue();\n+        if ($expectedFilterValue !== $filterValue) {\n+            throw new \\Exception(\n+                sprintf('The value of filter does not contain \"%s\" but \"%s\"', $filterValue, $expectedFilterValue)\n+            );\n+        }\n+    }\n+\n+    public function hasVisibleFilterValue($field)","path":"features/Pim/Behat/Decorator/Export/Filter/UpdatedTimeConditionDecorator.php","position":76,"original_position":76,"commit_id":"af48fa3c3b19e4a76dea95a1ad782d9e8ef1c2c3","original_commit_id":"af48fa3c3b19e4a76dea95a1ad782d9e8ef1c2c3","user":{"login":"pierallard","id":1590933,"avatar_url":"https://avatars.githubusercontent.com/u/1590933?v=3","gravatar_id":"","url":"https://api.github.com/users/pierallard","html_url":"https://github.com/pierallard","followers_url":"https://api.github.com/users/pierallard/followers","following_url":"https://api.github.com/users/pierallard/following{/other_user}","gists_url":"https://api.github.com/users/pierallard/gists{/gist_id}","starred_url":"https://api.github.com/users/pierallard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierallard/subscriptions","organizations_url":"https://api.github.com/users/pierallard/orgs","repos_url":"https://api.github.com/users/pierallard/repos","events_url":"https://api.github.com/users/pierallard/events{/privacy}","received_events_url":"https://api.github.com/users/pierallard/received_events","type":"User","site_admin":false},"body":"and the naming is not very precise, maybe \"checkFilterValidIsNotVisible\" or something else.","created_at":"2016-06-08T15:42:37Z","updated_at":"2016-06-08T15:42:37Z","html_url":"https://github.com/akeneo/pim-community-dev/pull/4591#discussion_r66281204","pull_request_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4591","_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments/66281204"},"html":{"href":"https://github.com/akeneo/pim-community-dev/pull/4591#discussion_r66281204"},"pull_request":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4591"}}},"pull_request":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4591","id":73015668,"html_url":"https://github.com/akeneo/pim-community-dev/pull/4591","diff_url":"https://github.com/akeneo/pim-community-dev/pull/4591.diff","patch_url":"https://github.com/akeneo/pim-community-dev/pull/4591.patch","issue_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/4591","number":4591,"state":"open","locked":false,"title":"PIM-5432: export the products updated for a period ","user":{"login":"aRn0D","id":3585922,"avatar_url":"https://avatars.githubusercontent.com/u/3585922?v=3","gravatar_id":"","url":"https://api.github.com/users/aRn0D","html_url":"https://github.com/aRn0D","followers_url":"https://api.github.com/users/aRn0D/followers","following_url":"https://api.github.com/users/aRn0D/following{/other_user}","gists_url":"https://api.github.com/users/aRn0D/gists{/gist_id}","starred_url":"https://api.github.com/users/aRn0D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aRn0D/subscriptions","organizations_url":"https://api.github.com/users/aRn0D/orgs","repos_url":"https://api.github.com/users/aRn0D/repos","events_url":"https://api.github.com/users/aRn0D/events{/privacy}","received_events_url":"https://api.github.com/users/aRn0D/received_events","type":"User","site_admin":false},"body":"As Peter, I would like to export only the products created or updated since the last n days (for example 30 days) in order to export only the data needed to the output channel.\r\n\r\n\r\n| Q                                 | A\r\n| --------------------------------- | ---\r\n| Added Specs                       | yes\r\n| Added Behats                      | yes \r\n| Changelog updated                 | yes\r\n| Review and 2 GTM                  | TODO\r\n| Micro Demo to the PO (Story only) | TODO\r\n| Migration script                  | no \r\n| Tech Doc                          | no\r\n","created_at":"2016-06-08T09:43:23Z","updated_at":"2016-06-08T15:42:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"231f40b638214ba2cb92b60db1268833b380b289","assignee":null,"milestone":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones/11","html_url":"https://github.com/akeneo/pim-community-dev/milestones/1.6.x","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones/11/labels","id":1599105,"number":11,"title":"1.6.x","description":"","creator":{"login":"nidup","id":2104359,"avatar_url":"https://avatars.githubusercontent.com/u/2104359?v=3","gravatar_id":"","url":"https://api.github.com/users/nidup","html_url":"https://github.com/nidup","followers_url":"https://api.github.com/users/nidup/followers","following_url":"https://api.github.com/users/nidup/following{/other_user}","gists_url":"https://api.github.com/users/nidup/gists{/gist_id}","starred_url":"https://api.github.com/users/nidup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nidup/subscriptions","organizations_url":"https://api.github.com/users/nidup/orgs","repos_url":"https://api.github.com/users/nidup/repos","events_url":"https://api.github.com/users/nidup/events{/privacy}","received_events_url":"https://api.github.com/users/nidup/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":39,"state":"open","created_at":"2016-02-23T07:31:39Z","updated_at":"2016-06-08T09:43:23Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4591/commits","review_comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4591/comments","review_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/4591/comments","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/af48fa3c3b19e4a76dea95a1ad782d9e8ef1c2c3","head":{"label":"akeneo:PIM-5432","ref":"PIM-5432","sha":"af48fa3c3b19e4a76dea95a1ad782d9e8ef1c2c3","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":5367323,"name":"pim-community-dev","full_name":"akeneo/pim-community-dev","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-community-dev","description":"[Community Development Repository] The open source Product Information Management (PIM)","fork":false,"url":"https://api.github.com/repos/akeneo/pim-community-dev","forks_url":"https://api.github.com/repos/akeneo/pim-community-dev/forks","keys_url":"https://api.github.com/repos/akeneo/pim-community-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-community-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-community-dev/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-community-dev/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/events","assignees_url":"https://api.github.com/repos/akeneo/pim-community-dev/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-community-dev/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-community-dev/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-community-dev/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-community-dev/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-community-dev/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-community-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-community-dev/merges","archive_url":"https://api.github.com/repos/akeneo/pim-community-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-community-dev/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-community-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-community-dev/releases{/id}","deployments_url":"https://api.github.com/repos/akeneo/pim-community-dev/deployments","created_at":"2012-08-10T09:27:26Z","updated_at":"2016-06-07T18:58:01Z","pushed_at":"2016-06-08T15:10:41Z","git_url":"git://github.com/akeneo/pim-community-dev.git","ssh_url":"git@github.com:akeneo/pim-community-dev.git","clone_url":"https://github.com/akeneo/pim-community-dev.git","svn_url":"https://github.com/akeneo/pim-community-dev","homepage":"http://www.akeneo.com","size":146116,"stargazers_count":314,"watchers_count":314,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":160,"mirror_url":null,"open_issues_count":98,"forks":160,"open_issues":98,"watchers":314,"default_branch":"master"}},"base":{"label":"akeneo:master","ref":"master","sha":"47cf68170fe096b7a34968f92382b9106df30ef0","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":5367323,"name":"pim-community-dev","full_name":"akeneo/pim-community-dev","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-community-dev","description":"[Community Development Repository] The open source Product Information Management (PIM)","fork":false,"url":"https://api.github.com/repos/akeneo/pim-community-dev","forks_url":"https://api.github.com/repos/akeneo/pim-community-dev/forks","keys_url":"https://api.github.com/repos/akeneo/pim-community-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-community-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-community-dev/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-community-dev/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/events","assignees_url":"https://api.github.com/repos/akeneo/pim-community-dev/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-community-dev/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-community-dev/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-community-dev/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-community-dev/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-community-dev/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-community-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-community-dev/merges","archive_url":"https://api.github.com/repos/akeneo/pim-community-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-community-dev/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-community-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-community-dev/releases{/id}","deployments_url":"https://api.github.com/repos/akeneo/pim-community-dev/deployments","created_at":"2012-08-10T09:27:26Z","updated_at":"2016-06-07T18:58:01Z","pushed_at":"2016-06-08T15:10:41Z","git_url":"git://github.com/akeneo/pim-community-dev.git","ssh_url":"git@github.com:akeneo/pim-community-dev.git","clone_url":"https://github.com/akeneo/pim-community-dev.git","svn_url":"https://github.com/akeneo/pim-community-dev","homepage":"http://www.akeneo.com","size":146116,"stargazers_count":314,"watchers_count":314,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":160,"mirror_url":null,"open_issues_count":98,"forks":160,"open_issues":98,"watchers":314,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4591"},"html":{"href":"https://github.com/akeneo/pim-community-dev/pull/4591"},"issue":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/issues/4591"},"comments":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/issues/4591/comments"},"review_comments":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4591/comments"},"review_comment":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4591/commits"},"statuses":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/af48fa3c3b19e4a76dea95a1ad782d9e8ef1c2c3"}}}}
{"actor":{"display_login":"pierallard"}}