{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/19898","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/19898/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/19898/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/19898/events","html_url":"https://github.com/magento/magento2/pull/19898","id":392977712,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMTE3ODE2","number":19898,"title":"Fixes sorting by price after partial reindex","user":{"login":"wiecur","id":11784494,"node_id":"MDQ6VXNlcjExNzg0NDk0","avatar_url":"https://avatars3.githubusercontent.com/u/11784494?v=4","gravatar_id":"","url":"https://api.github.com/users/wiecur","html_url":"https://github.com/wiecur","followers_url":"https://api.github.com/users/wiecur/followers","following_url":"https://api.github.com/users/wiecur/following{/other_user}","gists_url":"https://api.github.com/users/wiecur/gists{/gist_id}","starred_url":"https://api.github.com/users/wiecur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiecur/subscriptions","organizations_url":"https://api.github.com/users/wiecur/orgs","repos_url":"https://api.github.com/users/wiecur/repos","events_url":"https://api.github.com/users/wiecur/events{/privacy}","received_events_url":"https://api.github.com/users/wiecur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-20T10:18:51Z","updated_at":"2018-12-20T10:18:54Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/magento/magento2/pulls/19898","html_url":"https://github.com/magento/magento2/pull/19898","diff_url":"https://github.com/magento/magento2/pull/19898.diff","patch_url":"https://github.com/magento/magento2/pull/19898.patch"},"body":"This change should resolved problem with sorting by price.\r\n\r\nDescriptions of problem\r\n\r\nAfter run job indexer_update_all_views a lot of configurable products has got 0 as min_price and max_price in table _catalog_product_index_price_. This action causes problem with sorting by price.\r\nAfter call reindex _catalog_product_price_, prices backs to normal and sorting by price works correct.\r\n\r\nReproduce problem:\r\n- Preconditions\r\n1. Magento 2.3.0\r\n2. Php 7.1.13\r\n3. Mysql 5.6\r\n\r\n- Steps to reproduce:\r\n1. Install Sample Data\r\n2. Enable Magento cron\r\n3. Save two configurable products with the biggest and smaller entity_id\r\n\r\n\r\n\r\nThe problem is that in class Magento\\Catalog\\Model\\ResourceModel\\Product\\Indexer\\Price\\Query\\BaseFinalPrice in line 221 there is condition:\r\n\r\n`$select->where(sprintf('e.entity_id BETWEEN %s AND %s', min($entityIds), max($entityIds)));`\r\n\r\nand in class Magento\\ConfigurableProduct\\Model\\ResourceModel\\Product\\Indexer\\Price\\Configurable line 220 there is condition \r\n\r\n`$select->where('le.entity_id IN (?)', $entityIds);`\r\n\r\nSo all configurable products with entity_id between min($entityIds) and max($entityIds) and which are not on list $entityIds has got 0 as min_price and max_price in table catalog_product_index_price_temp so then also in catalog_product_index_price."},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/448946485","html_url":"https://github.com/magento/magento2/pull/19898#issuecomment-448946485","issue_url":"https://api.github.com/repos/magento/magento2/issues/19898","id":448946485,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODk0NjQ4NQ==","user":{"login":"magento-cicd2","id":14279950,"node_id":"MDQ6VXNlcjE0Mjc5OTUw","avatar_url":"https://avatars2.githubusercontent.com/u/14279950?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-cicd2","html_url":"https://github.com/magento-cicd2","followers_url":"https://api.github.com/users/magento-cicd2/followers","following_url":"https://api.github.com/users/magento-cicd2/following{/other_user}","gists_url":"https://api.github.com/users/magento-cicd2/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-cicd2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-cicd2/subscriptions","organizations_url":"https://api.github.com/users/magento-cicd2/orgs","repos_url":"https://api.github.com/users/magento-cicd2/repos","events_url":"https://api.github.com/users/magento-cicd2/events{/privacy}","received_events_url":"https://api.github.com/users/magento-cicd2/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T10:18:54Z","updated_at":"2018-12-20T10:18:54Z","author_association":"CONTRIBUTOR","body":"[![CLA assistant check](https://cla.dev.magento.com/pull/badge/not_signed)](https://cla.dev.magento.com/magento/magento2?pullRequest=19898) <br/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla.dev.magento.com/magento/magento2?pullRequest=19898) before we can accept your contribution.<br/>"}}
{"actor":{"display_login":"magento-cicd2"}}