-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to 0 pos value #37
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the function _reportAuctionStatus
also need changes in the verification condition of the bid position parameter?
@@ -316,7 +316,7 @@ function generateBidParameters(bid, bidderRequest) { | |||
}; | |||
|
|||
const pos = deepAccess(bid, `mediaTypes.${mediaType}.pos`); | |||
if (pos) { | |||
if (pos || pos === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add the same treatment to the other adapters like kueezBidAdapter.js
, minutemediaBidAdapter.js
, publirBidAdapter.js
, shinezBidAdapter.js
, stnBidAdapter.js
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I would advise to check also kueezBidAdapter
, minutemediaBidAdapter
, shinezBidAdapter
and stnBidAdapter
.
I'm not familiar with (and couldn't find) publirBidAdapter
, but if there any other adapters we own they would need to be updated as well
@@ -316,7 +316,7 @@ function generateBidParameters(bid, bidderRequest) { | |||
}; | |||
|
|||
const pos = deepAccess(bid, `mediaTypes.${mediaType}.pos`); | |||
if (pos) { | |||
if (pos || pos === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I would advise to check also kueezBidAdapter
, minutemediaBidAdapter
, shinezBidAdapter
and stnBidAdapter
.
I'm not familiar with (and couldn't find) publirBidAdapter
, but if there any other adapters we own they would need to be updated as well
const mediaType = bid.mediaTypes && bid.mediaTypes.banner ? BANNER : VIDEO; | ||
bid.mediaTypes[mediaType].pos = pos; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is done to create a new bid of your choice, and not for the production logic, there's no need for logic to test the bid's media type. You can simply add the property you want for testing, as you know the object:
bid.mediaTypes.banner.pos = pos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Add support to 0 pos value in bid adapter
added tests to support pos value