Skip to content
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

Fix selected bid for the right timestamp #736

Merged
merged 1 commit into from
Oct 24, 2016
Merged

Fix selected bid for the right timestamp #736

merged 1 commit into from
Oct 24, 2016

Conversation

dugwood
Copy link
Contributor

@dugwood dugwood commented Oct 22, 2016

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other

Description of change

The requested bid returned in addBidResponse isn't the good one, because it doesn't filter by adUnit.

Other information

#729 #700

@protonate that will be the last fix I'll do a PR for, as I don't see other errors I had before (requested !== received in the bidsBackAll function). Once #735 and this one are merged, I'll have a new look at everything (it's really difficult to fix many things somehow related, in multiple fixes).

Copy link
Collaborator

@protonate protonate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, test pass, fix is working, this combined with a PR up shortly will resolve (for now) how we are handling queued bid requests.

return $$PREBID_GLOBAL$$._bidsRequested.find(bidSet => bidSet.bidderCode === bidder) || { start: null, requestId: null };
function getBidSet(bidder, adUnitCode) {
return $$PREBID_GLOBAL$$._bidsRequested.find(bidSet => {
return bidSet.bids.filter(bid => bid.bidder === bidder && bid.placementCode === adUnitCode).length > 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will work with the approach we are now taking with queued bid requests -- bid requests and responses will be removed from the _bidsRequested and _bidsReceived arrays when that placement is part of the outgoing bid request.

@protonate protonate merged commit 3f350bc into prebid:master Oct 24, 2016
@dugwood
Copy link
Contributor Author

dugwood commented Oct 25, 2016

Thanks for the merge! I'll switch back to the master today.

@dugwood dugwood deleted the bids-back branch November 7, 2016 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants