{"action":"created","comment":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments/152589076","pull_request_review_id":78473034,"id":152589076,"diff_hunk":"@@ -322,13 +325,14 @@ public function getCatalogProductList($offset, $limit, $orderBy, $sortOrder, $po\n             'sql_select' => &$sqlSelect,\n             'sql_table' => &$sqlTable,\n             'sql_where' => &$sqlWhere,\n+            'sql_group_by' => &$sqlGroupBy,            \n             'sql_order' => &$sqlOrder,\n             'sql_limit' => &$sqlLimit,\n         ));\n \n-        $sql = $this->compileSqlQuery($sqlSelect, $sqlTable, $sqlWhere, $sqlOrder, $sqlLimit);\n-        $products = Db::getInstance()->executeS($sql, true, false);\n-        $total = Db::getInstance()->executeS('SELECT FOUND_ROWS();', true, false);\n+        $sql = $this->compileSqlQuery($sqlSelect, $sqlTable, $sqlWhere, $sqlGroupBy, $sqlOrder, $sqlLimit);\n+        $products = \\Db::getInstance()->executeS($sql, true, false);\n+        $total = \\Db::getInstance()->executeS('SELECT FOUND_ROWS();', true, false);","path":"src/Adapter/Product/AdminProductDataProvider.php","position":30,"original_position":30,"commit_id":"803748f9895a8b7b95c402d0f9a9a7bec2bb90c4","original_commit_id":"803748f9895a8b7b95c402d0f9a9a7bec2bb90c4","user":{"login":"Quetzacoalt91","id":6768917,"avatar_url":"https://avatars0.githubusercontent.com/u/6768917?v=4","gravatar_id":"","url":"https://api.github.com/users/Quetzacoalt91","html_url":"https://github.com/Quetzacoalt91","followers_url":"https://api.github.com/users/Quetzacoalt91/followers","following_url":"https://api.github.com/users/Quetzacoalt91/following{/other_user}","gists_url":"https://api.github.com/users/Quetzacoalt91/gists{/gist_id}","starred_url":"https://api.github.com/users/Quetzacoalt91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Quetzacoalt91/subscriptions","organizations_url":"https://api.github.com/users/Quetzacoalt91/orgs","repos_url":"https://api.github.com/users/Quetzacoalt91/repos","events_url":"https://api.github.com/users/Quetzacoalt91/events{/privacy}","received_events_url":"https://api.github.com/users/Quetzacoalt91/received_events","type":"User","site_admin":false},"body":"No need to replace `Db` with `\\Db`, as we declared the class at the top of the file with \r\n\r\n```php\r\nuse Db;\r\n```","created_at":"2017-11-22T15:00:40Z","updated_at":"2017-11-22T15:00:40Z","html_url":"https://github.com/PrestaShop/PrestaShop/pull/8514#discussion_r152589076","pull_request_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8514","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments/152589076"},"html":{"href":"https://github.com/PrestaShop/PrestaShop/pull/8514#discussion_r152589076"},"pull_request":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8514"}}},"pull_request":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8514","id":153469604,"html_url":"https://github.com/PrestaShop/PrestaShop/pull/8514","diff_url":"https://github.com/PrestaShop/PrestaShop/pull/8514.diff","patch_url":"https://github.com/PrestaShop/PrestaShop/pull/8514.patch","issue_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8514","number":8514,"state":"open","locked":false,"title":"Added GroupBy option for actionAdminProductsListingFieldsModifier hook","user":{"login":"astterx","id":7818358,"avatar_url":"https://avatars1.githubusercontent.com/u/7818358?v=4","gravatar_id":"","url":"https://api.github.com/users/astterx","html_url":"https://github.com/astterx","followers_url":"https://api.github.com/users/astterx/followers","following_url":"https://api.github.com/users/astterx/following{/other_user}","gists_url":"https://api.github.com/users/astterx/gists{/gist_id}","starred_url":"https://api.github.com/users/astterx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astterx/subscriptions","organizations_url":"https://api.github.com/users/astterx/orgs","repos_url":"https://api.github.com/users/astterx/repos","events_url":"https://api.github.com/users/astterx/events{/privacy}","received_events_url":"https://api.github.com/users/astterx/received_events","type":"User","site_admin":false},"body":"<!-- Thank you for contributing to the PrestaShop project! \r\n\r\nPlease take the time to edit the \"Answers\" rows with the necessary information: -->\r\n\r\n| Questions     | Answers\r\n| ------------- | -------------------------------------------------------\r\n| Branch?       | develop.\r\n| Description?  | Added group by for sql query to be used with actionAdminProductsListingFieldsModifier hook\r\n| Type?         | improvement\r\n| Category?     | CO\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Fixed ticket? | (optional) If this PR fixes a [Forge](http://forge.prestashop.com/) ticket, please add its complete Forge URL.\r\n| How to test?  | Please indicate how to best verify that this PR is correct.\r\n\r\n<!-- Click the form's \"Preview button\" to make sure the table is functional in GitHub. Thank you! -->\r\n\r\n#### Important guidelines\r\n\r\n* Make sure [your local branch is up to date](https://help.github.com/articles/syncing-a-fork/) before commiting your changes!\r\n* Your code MUST respect [our Coding Standards](http://doc.prestashop.com/display/PS16/Coding+Standards) (for code written in PHP, JavaScript, HTML/CSS/Smarty/Twig, SQL)!\r\n* Your commit name MUST respect our [naming convention](http://doc.prestashop.com/display/PS16/How+to+write+a+commit+message)!\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/prestashop/prestashop/8514)\n<!-- Reviewable:end -->\n","created_at":"2017-11-18T21:48:08Z","updated_at":"2017-11-22T15:00:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fb1c1750dd75db20b5b7399d3680199042dd780","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8514/commits","review_comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8514/comments","review_comment_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8514/comments","statuses_url":"https://api.github.com/repos/PrestaShop/PrestaShop/statuses/803748f9895a8b7b95c402d0f9a9a7bec2bb90c4","head":{"label":"astterx:develop","ref":"develop","sha":"803748f9895a8b7b95c402d0f9a9a7bec2bb90c4","user":{"login":"astterx","id":7818358,"avatar_url":"https://avatars1.githubusercontent.com/u/7818358?v=4","gravatar_id":"","url":"https://api.github.com/users/astterx","html_url":"https://github.com/astterx","followers_url":"https://api.github.com/users/astterx/followers","following_url":"https://api.github.com/users/astterx/following{/other_user}","gists_url":"https://api.github.com/users/astterx/gists{/gist_id}","starred_url":"https://api.github.com/users/astterx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astterx/subscriptions","organizations_url":"https://api.github.com/users/astterx/orgs","repos_url":"https://api.github.com/users/astterx/repos","events_url":"https://api.github.com/users/astterx/events{/privacy}","received_events_url":"https://api.github.com/users/astterx/received_events","type":"User","site_admin":false},"repo":{"id":86504418,"name":"PrestaShop","full_name":"astterx/PrestaShop","owner":{"login":"astterx","id":7818358,"avatar_url":"https://avatars1.githubusercontent.com/u/7818358?v=4","gravatar_id":"","url":"https://api.github.com/users/astterx","html_url":"https://github.com/astterx","followers_url":"https://api.github.com/users/astterx/followers","following_url":"https://api.github.com/users/astterx/following{/other_user}","gists_url":"https://api.github.com/users/astterx/gists{/gist_id}","starred_url":"https://api.github.com/users/astterx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astterx/subscriptions","organizations_url":"https://api.github.com/users/astterx/orgs","repos_url":"https://api.github.com/users/astterx/repos","events_url":"https://api.github.com/users/astterx/events{/privacy}","received_events_url":"https://api.github.com/users/astterx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/astterx/PrestaShop","description":"PrestaShop offers a free, fully scalable, Open Source e-commerce solution.","fork":true,"url":"https://api.github.com/repos/astterx/PrestaShop","forks_url":"https://api.github.com/repos/astterx/PrestaShop/forks","keys_url":"https://api.github.com/repos/astterx/PrestaShop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astterx/PrestaShop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astterx/PrestaShop/teams","hooks_url":"https://api.github.com/repos/astterx/PrestaShop/hooks","issue_events_url":"https://api.github.com/repos/astterx/PrestaShop/issues/events{/number}","events_url":"https://api.github.com/repos/astterx/PrestaShop/events","assignees_url":"https://api.github.com/repos/astterx/PrestaShop/assignees{/user}","branches_url":"https://api.github.com/repos/astterx/PrestaShop/branches{/branch}","tags_url":"https://api.github.com/repos/astterx/PrestaShop/tags","blobs_url":"https://api.github.com/repos/astterx/PrestaShop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astterx/PrestaShop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astterx/PrestaShop/git/refs{/sha}","trees_url":"https://api.github.com/repos/astterx/PrestaShop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astterx/PrestaShop/statuses/{sha}","languages_url":"https://api.github.com/repos/astterx/PrestaShop/languages","stargazers_url":"https://api.github.com/repos/astterx/PrestaShop/stargazers","contributors_url":"https://api.github.com/repos/astterx/PrestaShop/contributors","subscribers_url":"https://api.github.com/repos/astterx/PrestaShop/subscribers","subscription_url":"https://api.github.com/repos/astterx/PrestaShop/subscription","commits_url":"https://api.github.com/repos/astterx/PrestaShop/commits{/sha}","git_commits_url":"https://api.github.com/repos/astterx/PrestaShop/git/commits{/sha}","comments_url":"https://api.github.com/repos/astterx/PrestaShop/comments{/number}","issue_comment_url":"https://api.github.com/repos/astterx/PrestaShop/issues/comments{/number}","contents_url":"https://api.github.com/repos/astterx/PrestaShop/contents/{+path}","compare_url":"https://api.github.com/repos/astterx/PrestaShop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astterx/PrestaShop/merges","archive_url":"https://api.github.com/repos/astterx/PrestaShop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astterx/PrestaShop/downloads","issues_url":"https://api.github.com/repos/astterx/PrestaShop/issues{/number}","pulls_url":"https://api.github.com/repos/astterx/PrestaShop/pulls{/number}","milestones_url":"https://api.github.com/repos/astterx/PrestaShop/milestones{/number}","notifications_url":"https://api.github.com/repos/astterx/PrestaShop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astterx/PrestaShop/labels{/name}","releases_url":"https://api.github.com/repos/astterx/PrestaShop/releases{/id}","deployments_url":"https://api.github.com/repos/astterx/PrestaShop/deployments","created_at":"2017-03-28T20:30:42Z","updated_at":"2017-03-28T20:30:56Z","pushed_at":"2017-11-19T13:24:07Z","git_url":"git://github.com/astterx/PrestaShop.git","ssh_url":"git@github.com:astterx/PrestaShop.git","clone_url":"https://github.com/astterx/PrestaShop.git","svn_url":"https://github.com/astterx/PrestaShop","homepage":"http://www.prestashop.com/","size":291621,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"PrestaShop:develop","ref":"develop","sha":"38957232eeb08cfcbe1aae2f1828fd6ee8a03e7e","user":{"login":"PrestaShop","id":2815696,"avatar_url":"https://avatars3.githubusercontent.com/u/2815696?v=4","gravatar_id":"","url":"https://api.github.com/users/PrestaShop","html_url":"https://github.com/PrestaShop","followers_url":"https://api.github.com/users/PrestaShop/followers","following_url":"https://api.github.com/users/PrestaShop/following{/other_user}","gists_url":"https://api.github.com/users/PrestaShop/gists{/gist_id}","starred_url":"https://api.github.com/users/PrestaShop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PrestaShop/subscriptions","organizations_url":"https://api.github.com/users/PrestaShop/orgs","repos_url":"https://api.github.com/users/PrestaShop/repos","events_url":"https://api.github.com/users/PrestaShop/events{/privacy}","received_events_url":"https://api.github.com/users/PrestaShop/received_events","type":"Organization","site_admin":false},"repo":{"id":6763587,"name":"PrestaShop","full_name":"PrestaShop/PrestaShop","owner":{"login":"PrestaShop","id":2815696,"avatar_url":"https://avatars3.githubusercontent.com/u/2815696?v=4","gravatar_id":"","url":"https://api.github.com/users/PrestaShop","html_url":"https://github.com/PrestaShop","followers_url":"https://api.github.com/users/PrestaShop/followers","following_url":"https://api.github.com/users/PrestaShop/following{/other_user}","gists_url":"https://api.github.com/users/PrestaShop/gists{/gist_id}","starred_url":"https://api.github.com/users/PrestaShop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PrestaShop/subscriptions","organizations_url":"https://api.github.com/users/PrestaShop/orgs","repos_url":"https://api.github.com/users/PrestaShop/repos","events_url":"https://api.github.com/users/PrestaShop/events{/privacy}","received_events_url":"https://api.github.com/users/PrestaShop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PrestaShop/PrestaShop","description":"PrestaShop offers a free, fully scalable, Open Source e-commerce solution.","fork":false,"url":"https://api.github.com/repos/PrestaShop/PrestaShop","forks_url":"https://api.github.com/repos/PrestaShop/PrestaShop/forks","keys_url":"https://api.github.com/repos/PrestaShop/PrestaShop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PrestaShop/PrestaShop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PrestaShop/PrestaShop/teams","hooks_url":"https://api.github.com/repos/PrestaShop/PrestaShop/hooks","issue_events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/events{/number}","events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/events","assignees_url":"https://api.github.com/repos/PrestaShop/PrestaShop/assignees{/user}","branches_url":"https://api.github.com/repos/PrestaShop/PrestaShop/branches{/branch}","tags_url":"https://api.github.com/repos/PrestaShop/PrestaShop/tags","blobs_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/refs{/sha}","trees_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PrestaShop/PrestaShop/statuses/{sha}","languages_url":"https://api.github.com/repos/PrestaShop/PrestaShop/languages","stargazers_url":"https://api.github.com/repos/PrestaShop/PrestaShop/stargazers","contributors_url":"https://api.github.com/repos/PrestaShop/PrestaShop/contributors","subscribers_url":"https://api.github.com/repos/PrestaShop/PrestaShop/subscribers","subscription_url":"https://api.github.com/repos/PrestaShop/PrestaShop/subscription","commits_url":"https://api.github.com/repos/PrestaShop/PrestaShop/commits{/sha}","git_commits_url":"https://api.github.com/repos/PrestaShop/PrestaShop/git/commits{/sha}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/comments{/number}","issue_comment_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/comments{/number}","contents_url":"https://api.github.com/repos/PrestaShop/PrestaShop/contents/{+path}","compare_url":"https://api.github.com/repos/PrestaShop/PrestaShop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PrestaShop/PrestaShop/merges","archive_url":"https://api.github.com/repos/PrestaShop/PrestaShop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PrestaShop/PrestaShop/downloads","issues_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues{/number}","pulls_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls{/number}","milestones_url":"https://api.github.com/repos/PrestaShop/PrestaShop/milestones{/number}","notifications_url":"https://api.github.com/repos/PrestaShop/PrestaShop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/labels{/name}","releases_url":"https://api.github.com/repos/PrestaShop/PrestaShop/releases{/id}","deployments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/deployments","created_at":"2012-11-19T16:41:31Z","updated_at":"2017-11-22T01:19:24Z","pushed_at":"2017-11-22T14:38:37Z","git_url":"git://github.com/PrestaShop/PrestaShop.git","ssh_url":"git@github.com:PrestaShop/PrestaShop.git","clone_url":"https://github.com/PrestaShop/PrestaShop.git","svn_url":"https://github.com/PrestaShop/PrestaShop","homepage":"http://www.prestashop.com/","size":303741,"stargazers_count":2709,"watchers_count":2709,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2531,"mirror_url":null,"archived":false,"open_issues_count":236,"forks":2531,"open_issues":236,"watchers":2709,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8514"},"html":{"href":"https://github.com/PrestaShop/PrestaShop/pull/8514"},"issue":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8514"},"comments":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/8514/comments"},"review_comments":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8514/comments"},"review_comment":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/8514/commits"},"statuses":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/statuses/803748f9895a8b7b95c402d0f9a9a7bec2bb90c4"}},"author_association":"NONE"}}
{"actor":{"display_login":"Quetzacoalt91"}}