{"action":"created","comment":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments/68394858","id":68394858,"diff_hunk":"@@ -55,11 +55,10 @@ private function fillImages(\n \n         if (isset($product['id_product_attribute'])) {\n             foreach ($presentedProduct['images'] as $image) {\n-                foreach ($image['associatedVariants'] as $id) {\n-                    if ((int) $id === (int) $product['id_product_attribute']) {\n-                        $presentedProduct['cover'] = $image;\n-                        break 2;\n-                    }\n+                if (null !== $image['cover']) {\n+                    $presentedProduct['cover'] = $image;\n+\n+                    break 1;","path":"src/Core/Product/AbstractProductPresenter.php","position":null,"original_position":12,"commit_id":"e98b44dc5cd9e3127a4ef57fc7f136796f18b429","original_commit_id":"d6083124346e6e520eaebad9c74c19488f5fd4b6","user":{"login":"mickaelandrieu","id":1247388,"avatar_url":"https://avatars.githubusercontent.com/u/1247388?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelandrieu","html_url":"https://github.com/mickaelandrieu","followers_url":"https://api.github.com/users/mickaelandrieu/followers","following_url":"https://api.github.com/users/mickaelandrieu/following{/other_user}","gists_url":"https://api.github.com/users/mickaelandrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelandrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelandrieu/subscriptions","organizations_url":"https://api.github.com/users/mickaelandrieu/orgs","repos_url":"https://api.github.com/users/mickaelandrieu/repos","events_url":"https://api.github.com/users/mickaelandrieu/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelandrieu/received_events","type":"User","site_admin":false},"body":"done.","created_at":"2016-06-24T13:06:58Z","updated_at":"2016-06-24T13:06:58Z","html_url":"https://github.com/PrestaShop/PrestaShop/pull/5790#discussion_r68394858","pull_request_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/5790","_links":{"self":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments/68394858"},"html":{"href":"https://github.com/PrestaShop/PrestaShop/pull/5790#discussion_r68394858"},"pull_request":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/5790"}}},"pull_request":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/5790","id":75106159,"html_url":"https://github.com/PrestaShop/PrestaShop/pull/5790","diff_url":"https://github.com/PrestaShop/PrestaShop/pull/5790.diff","patch_url":"https://github.com/PrestaShop/PrestaShop/pull/5790.patch","issue_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/5790","number":5790,"state":"open","locked":false,"title":"Select the cover image and not the first one if set in back office","user":{"login":"mickaelandrieu","id":1247388,"avatar_url":"https://avatars.githubusercontent.com/u/1247388?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelandrieu","html_url":"https://github.com/mickaelandrieu","followers_url":"https://api.github.com/users/mickaelandrieu/followers","following_url":"https://api.github.com/users/mickaelandrieu/following{/other_user}","gists_url":"https://api.github.com/users/mickaelandrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelandrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelandrieu/subscriptions","organizations_url":"https://api.github.com/users/mickaelandrieu/orgs","repos_url":"https://api.github.com/users/mickaelandrieu/repos","events_url":"https://api.github.com/users/mickaelandrieu/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelandrieu/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?  | The cover was always the first picture in product image, it's now the selected cover.\r\n| Type?         | bug fix / improvement / new feature\r\n| Category?     | CO\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Fixed ticket? | http://forge.prestashop.com/browse/BOOM-846\r\n| How to test?  | The cover was always the first picture in product image, it's now the selected cover.\r\n","created_at":"2016-06-24T12:23:19Z","updated_at":"2016-06-24T13:06:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bef8443b7d64927aedd4b928fe4e1bdf2ea6eb3f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/5790/commits","review_comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/5790/comments","review_comment_url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/5790/comments","statuses_url":"https://api.github.com/repos/PrestaShop/PrestaShop/statuses/e98b44dc5cd9e3127a4ef57fc7f136796f18b429","head":{"label":"mickaelandrieu:boom-846-cover-image-update-doesnt-apply","ref":"boom-846-cover-image-update-doesnt-apply","sha":"e98b44dc5cd9e3127a4ef57fc7f136796f18b429","user":{"login":"mickaelandrieu","id":1247388,"avatar_url":"https://avatars.githubusercontent.com/u/1247388?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelandrieu","html_url":"https://github.com/mickaelandrieu","followers_url":"https://api.github.com/users/mickaelandrieu/followers","following_url":"https://api.github.com/users/mickaelandrieu/following{/other_user}","gists_url":"https://api.github.com/users/mickaelandrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelandrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelandrieu/subscriptions","organizations_url":"https://api.github.com/users/mickaelandrieu/orgs","repos_url":"https://api.github.com/users/mickaelandrieu/repos","events_url":"https://api.github.com/users/mickaelandrieu/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelandrieu/received_events","type":"User","site_admin":false},"repo":{"id":45130346,"name":"PrestaShop","full_name":"mickaelandrieu/PrestaShop","owner":{"login":"mickaelandrieu","id":1247388,"avatar_url":"https://avatars.githubusercontent.com/u/1247388?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelandrieu","html_url":"https://github.com/mickaelandrieu","followers_url":"https://api.github.com/users/mickaelandrieu/followers","following_url":"https://api.github.com/users/mickaelandrieu/following{/other_user}","gists_url":"https://api.github.com/users/mickaelandrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelandrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelandrieu/subscriptions","organizations_url":"https://api.github.com/users/mickaelandrieu/orgs","repos_url":"https://api.github.com/users/mickaelandrieu/repos","events_url":"https://api.github.com/users/mickaelandrieu/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelandrieu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mickaelandrieu/PrestaShop","description":"PrestaShop offers a free, fully scalable, Open-source e-commerce solution.","fork":true,"url":"https://api.github.com/repos/mickaelandrieu/PrestaShop","forks_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/forks","keys_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/teams","hooks_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/hooks","issue_events_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/issues/events{/number}","events_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/events","assignees_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/assignees{/user}","branches_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/branches{/branch}","tags_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/tags","blobs_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/git/refs{/sha}","trees_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/statuses/{sha}","languages_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/languages","stargazers_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/stargazers","contributors_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/contributors","subscribers_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/subscribers","subscription_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/subscription","commits_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/commits{/sha}","git_commits_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/git/commits{/sha}","comments_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/comments{/number}","issue_comment_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/issues/comments{/number}","contents_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/contents/{+path}","compare_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/merges","archive_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/downloads","issues_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/issues{/number}","pulls_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/pulls{/number}","milestones_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/milestones{/number}","notifications_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/labels{/name}","releases_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/releases{/id}","deployments_url":"https://api.github.com/repos/mickaelandrieu/PrestaShop/deployments","created_at":"2015-10-28T17:34:50Z","updated_at":"2016-01-12T13:36:53Z","pushed_at":"2016-06-24T13:01:27Z","git_url":"git://github.com/mickaelandrieu/PrestaShop.git","ssh_url":"git@github.com:mickaelandrieu/PrestaShop.git","clone_url":"https://github.com/mickaelandrieu/PrestaShop.git","svn_url":"https://github.com/mickaelandrieu/PrestaShop","homepage":"http://www.prestashop.com/","size":248540,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"develop"}},"base":{"label":"PrestaShop:develop","ref":"develop","sha":"d03bd4a05726c62e910eaf32dce8e0fef31c7243","user":{"login":"PrestaShop","id":2815696,"avatar_url":"https://avatars.githubusercontent.com/u/2815696?v=3","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://avatars.githubusercontent.com/u/2815696?v=3","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":"2016-06-23T20:47:07Z","pushed_at":"2016-06-24T13:01:28Z","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":314064,"stargazers_count":1857,"watchers_count":1857,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1930,"mirror_url":null,"open_issues_count":340,"forks":1930,"open_issues":340,"watchers":1857,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/5790"},"html":{"href":"https://github.com/PrestaShop/PrestaShop/pull/5790"},"issue":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/5790"},"comments":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/5790/comments"},"review_comments":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/5790/comments"},"review_comment":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/5790/commits"},"statuses":{"href":"https://api.github.com/repos/PrestaShop/PrestaShop/statuses/e98b44dc5cd9e3127a4ef57fc7f136796f18b429"}}}}
{"actor":{"display_login":"mickaelandrieu"}}