Premium apps not returned by reviewer search tool

VERIFIED FIXED in 2013-08-27

Status

P2
normal
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: adora, Assigned: mat)

Tracking

2013-08-27
x86
Mac OS X
Points:
---

Details

(Reporter)

Description

5 years ago
Examples:
Jaxogram
FoxyMPD
Text him?
Echo Mage MTG

Exception: Webfighter, which is free with in-app

Search options selected: any status, any app type, any device type, and tried many combinations of premium type flags.
(Assignee)

Comment 1

5 years ago
It appears to be restricted to 'premium' checkbox, at least on -dev (free-inapp, free, other seem to be working, I suspect premium-inapp works and we just don't have any in -dev)

I can reproduce on -dev with curl:

This works:
curl 'https://marketplace-dev.allizom.org/api/v1/apps/search/?region=pl&premium_types=premium'

This doesn't, returning a 200 OK with 0 objects:
curl https://marketplace-dev.allizom.org/api/v1/reviewers/search/?premium_types=premium' -H 'Cookie: sessionid="<insert_sessionid_here>"'

And I'm stuck here for now. I thought it'd have something to do with the region, but the reviewers search api code should bypass all region filtering, and adding region=pl in the URL doesn't help. And, to make things worse, it works for me locally, although my premium apps locally have been created & validated manually since I don't have a payments account set up.
(In reply to Mathieu Pillard [:mat] from comment #1)
> It appears to be restricted to 'premium' checkbox, at least on -dev
> (free-inapp, free, other seem to be working, I suspect premium-inapp works
> and we just don't have any in -dev)

Jaxogram is premium-inapp and that doesn't show up either.  So its both the premium types.
Looking at the debug output for the ES query it's doing both of the following.:

* {"not": {"filter": {"in": {"premium_type": [1, 2]}}}}
* {"in": {"premium_type": [1]}}

Which no app will have both true. Somewhere it's adding the 2nd one.
Component: Reviewer Tools → API
Correction to last comment...

The 2nd query is the one we want, it's the first one that's breaking things.

That is added because of this:
https://github.com/mozilla/zamboni/blob/master/mkt/webapps/models.py#L698

Hopefully that's enough for someone to fix?
(Assignee)

Comment 5

5 years ago
Yeah, good catch, thanks, that's more than enough for me to easily fix this.
Assignee: nobody → mpillard
It might be good to take out the uses_flash filtering for reviewers too, while you're tinkering with that function.
Priority: -- → P2
(Assignee)

Comment 7

5 years ago
Fixed in https://github.com/mozilla/zamboni/commit/1572ab7fa0e136c40bbcd973c18a60be38932fbd

STR:
- In reviewer tools, in the advanced search, check the premium apps checkbox and hit the search button.
- You should get some results :)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-08-27
You need to log in before you can comment on or make changes to this bug.