{"action":"opened","issue":{"url":"https://api.github.com/repos/techdivision/import-product-media/issues/36","repository_url":"https://api.github.com/repos/techdivision/import-product-media","labels_url":"https://api.github.com/repos/techdivision/import-product-media/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/techdivision/import-product-media/issues/36/comments","events_url":"https://api.github.com/repos/techdivision/import-product-media/issues/36/events","html_url":"https://github.com/techdivision/import-product-media/issues/36","id":463756284,"node_id":"MDU6SXNzdWU0NjM3NTYyODQ=","number":36,"title":"All media_gallery_values have position 1","user":{"login":"david-fuehr","id":22166869,"node_id":"MDQ6VXNlcjIyMTY2ODY5","avatar_url":"https://avatars2.githubusercontent.com/u/22166869?v=4","gravatar_id":"","url":"https://api.github.com/users/david-fuehr","html_url":"https://github.com/david-fuehr","followers_url":"https://api.github.com/users/david-fuehr/followers","following_url":"https://api.github.com/users/david-fuehr/following{/other_user}","gists_url":"https://api.github.com/users/david-fuehr/gists{/gist_id}","starred_url":"https://api.github.com/users/david-fuehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-fuehr/subscriptions","organizations_url":"https://api.github.com/users/david-fuehr/orgs","repos_url":"https://api.github.com/users/david-fuehr/repos","events_url":"https://api.github.com/users/david-fuehr/events{/privacy}","received_events_url":"https://api.github.com/users/david-fuehr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-07-03T13:33:47Z","updated_at":"2019-07-03T13:33:47Z","closed_at":null,"author_association":"NONE","body":"*Repro*\r\n1. import product with `base_image, additional_images (additional_image_a, additional_image_b)`\r\n1. check database table `catalog_product_entity_media_gallery_value`\r\n    1. _expected:_ `base_image` has position `1`, `additional_image_a` has position `2`, `additional_image_b` has position `3`\r\n    1. _actual:_ all images have position `1`\r\n\r\n*Information*\r\nThe (generated) file `media_*.csv` contains a line for each image and may contain several lines for a specific `sku`.\r\nThe observer `\u001Dtechdivision/import-product-media/src/Observers/MediaGalleryObserver.php` gets executed for each line of that csv and resets the position counter in line 105.\r\nLater the observer `techdivision/import-product-media-ee/src/Observers/EeMediaGalleryValueObserver.php` is executed and reads (and increments) the position counter.\r\nFor each line of that csv file the observers are executed in this order and therefore each `gallery_value` is persisted with `position = 1`."}}
{"actor":{"display_login":"david-fuehr"}}