{"action":"closed","issue":{"url":"https://api.github.com/repos/prebid/Prebid.js/issues/2843","repository_url":"https://api.github.com/repos/prebid/Prebid.js","labels_url":"https://api.github.com/repos/prebid/Prebid.js/issues/2843/labels{/name}","comments_url":"https://api.github.com/repos/prebid/Prebid.js/issues/2843/comments","events_url":"https://api.github.com/repos/prebid/Prebid.js/issues/2843/events","html_url":"https://github.com/prebid/Prebid.js/issues/2843","id":341013017,"node_id":"MDU6SXNzdWUzNDEwMTMwMTc=","number":2843,"title":"Rubicon requests sizes which should be filtered by media query","user":{"login":"drdmitry","id":4129726,"node_id":"MDQ6VXNlcjQxMjk3MjY=","avatar_url":"https://avatars3.githubusercontent.com/u/4129726?v=4","gravatar_id":"","url":"https://api.github.com/users/drdmitry","html_url":"https://github.com/drdmitry","followers_url":"https://api.github.com/users/drdmitry/followers","following_url":"https://api.github.com/users/drdmitry/following{/other_user}","gists_url":"https://api.github.com/users/drdmitry/gists{/gist_id}","starred_url":"https://api.github.com/users/drdmitry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drdmitry/subscriptions","organizations_url":"https://api.github.com/users/drdmitry/orgs","repos_url":"https://api.github.com/users/drdmitry/repos","events_url":"https://api.github.com/users/drdmitry/events{/privacy}","received_events_url":"https://api.github.com/users/drdmitry/received_events","type":"User","site_admin":false},"labels":[{"id":491219875,"node_id":"MDU6TGFiZWw0OTEyMTk4NzU=","url":"https://api.github.com/repos/prebid/Prebid.js/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":{"login":"snapwich","id":551085,"node_id":"MDQ6VXNlcjU1MTA4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/551085?v=4","gravatar_id":"","url":"https://api.github.com/users/snapwich","html_url":"https://github.com/snapwich","followers_url":"https://api.github.com/users/snapwich/followers","following_url":"https://api.github.com/users/snapwich/following{/other_user}","gists_url":"https://api.github.com/users/snapwich/gists{/gist_id}","starred_url":"https://api.github.com/users/snapwich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapwich/subscriptions","organizations_url":"https://api.github.com/users/snapwich/orgs","repos_url":"https://api.github.com/users/snapwich/repos","events_url":"https://api.github.com/users/snapwich/events{/privacy}","received_events_url":"https://api.github.com/users/snapwich/received_events","type":"User","site_admin":false},"assignees":[{"login":"snapwich","id":551085,"node_id":"MDQ6VXNlcjU1MTA4NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/551085?v=4","gravatar_id":"","url":"https://api.github.com/users/snapwich","html_url":"https://github.com/snapwich","followers_url":"https://api.github.com/users/snapwich/followers","following_url":"https://api.github.com/users/snapwich/following{/other_user}","gists_url":"https://api.github.com/users/snapwich/gists{/gist_id}","starred_url":"https://api.github.com/users/snapwich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapwich/subscriptions","organizations_url":"https://api.github.com/users/snapwich/orgs","repos_url":"https://api.github.com/users/snapwich/repos","events_url":"https://api.github.com/users/snapwich/events{/privacy}","received_events_url":"https://api.github.com/users/snapwich/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-07-13T13:09:55Z","updated_at":"2018-07-27T15:54:35Z","closed_at":"2018-07-27T15:54:35Z","author_association":"NONE","body":"## Type of issue\r\n<!-- Is this a bug, feature request, question, etc.? Note if this is a documentation issue, please open a ticket here instead: https://github.com/prebid/prebid.github.io -->\r\nBug\r\n\r\n## Description\r\n<!-- Describe the issue -->\r\nWhen using Media queries withing configuration, Prebid is filtering the bid.sizes based on the matched media query, but not filtering MediaTypes.banner.sizes.\r\nRubicon adapter uses sizes from MediaTypes.banner.sizes first, and if not present then from bid.sizes.\r\n\r\nThis causes an issue, that adapter is using the size (from MediaTypes.banner.sizes), which should actually be filtered.\r\n\r\n## Steps to reproduce\r\n<!--\r\n  If this is a bug, please provide a list of steps to reproduce the issue\r\n-->\r\n1 Set media queries in Prebid via setConfig\r\n2 Have several sizes defined for the AdUnit via MediaTypes.banner.sizes\r\n3 Request bids\r\n\r\n```\r\n    var adUnits = [{\r\n        code: 'div-gpt-ad-1460505748561-0',\r\n        mediaTypes: {\r\n            banner: {\r\n                sizes: [[160, 600], [300, 600]]\r\n            }\r\n        },\r\n        bids: [{\r\n            bidder: 'rubicon',\r\n            params: {\r\n               accountId: '111', // dummy id\r\n               siteId: '111', // dummy id\r\n               zoneId: '111, // dummy id\r\n            }\r\n        }],\r\n        labelAny: ['size-160', 'size-300']\r\n    }];\r\n```\r\n\r\nsizeConfig is below\r\n(note: max-width = 4999px is used to be always matched for the issue illustration)\r\n```\r\n            sizeConfig: [\r\n              {\r\n                mediaQuery: '(min-width: 5000px)',\r\n                sizesSupported: [ [ 160, 600 ], [ 300, 600 ] ],\r\n                labels: [ 'size-160',  'size-300']\r\n              },\r\n              {\r\n                mediaQuery: '(min-width: 300px) and (max-width: 4999px)',\r\n                sizesSupported: [ [ 160, 600 ] ],\r\n                labels: [ 'size-160' ]\r\n              },\r\n              {\r\n                mediaQuery: '(min-width: 0px) and (max-width: 299px)',\r\n                sizesSupported: [],\r\n                labels: []\r\n              }\r\n            ]\r\n```\r\n\r\n\r\n## Test page\r\n<!--\r\nInclude a link to a test page or minimal demo of the problem via\r\n  https://jsfiddle.net, http://jsbin.com or similar.\r\n-->\r\nhttps://jsbin.com/buburecuxu/edit?html,output\r\n\r\n### Expected results\r\nRubicon adapter requests bid with the size_id = 9 (160x600) only.\r\n\r\n### Actual results\r\nRubicon adapter requests bid with the size_id = 9 (160x600) and alt_size_id = 10 (300x600) and we receive bid with the size 300x600, which should be filtered by Prebid based on Media query.\r\n\r\n## Platform details\r\n<!-- Which versions of Prebid.js, browser / OS, node, npm, etc. -->\r\nPrebid 1.16, Chrome\r\n\r\n## Other information\r\n<!-- References to related issue or PR #s, etc. -->\r\n#2607 "}}
{"actor":{"display_login":"snapwich"}}