Addons-server: Reviews count from DevHub is not consistent with reviews count in new frontend

Created on 12 Feb 2018  路  24Comments  路  Source: mozilla/addons-server

Follow up of #7111
Prerequisites: you need to have at least one add-on submitted; add-on contains empty user reviews

STR:

  1. Log in to Developer Hub and go to Manage my submissions
  2. Look at an add-on that has been rated and also includes some empty user reviews - make a note of the number of reviews displayed in dev-hub
  3. Click on the "<# reviews>" link to read all the available reviews on the frontend

Actual result:
The number of reviews displayed in DevHub is not the same as the actual number of reviews (empty+written) listed on the frontend

Expected result:
Number of reviews displayed in DevHub matches the actual number of reviews (empty+written) listed on the new frontend

Notes:
Reproduced on all AMO servers

[dev-hub]
image

[frontend]
image

devhub ratings and reviews good first bug mentor assigned p4 verified fixed

All 24 comments

Is it just a matter of displaying the number of reviews with text instead of all reviews ?

Yeah, it sounds like it's counting both reviews and ratings, and it should only count reviews (with text).

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.

If this is your first contribution, please refer to https://wiki.mozilla.org/Add-ons/Contribute/Code on how to get started.

Mentor: @eviljeff

Andrew, can you add a few more steps on how to get started with this? :)

looks like to fix this you'll need to update two templates to use addon.text_ratings_count rather than addon.total_ratings
https://github.com/mozilla/addons-server/blob/master/src/olympia/ratings/templates/ratings/impala/reviews_link.html
https://github.com/mozilla/addons-server/blob/master/src/olympia/ratings/templates/ratings/reviews_link.html

This will likely result in some test fails - if you will need to fix the tests too.

@eviljeff I want to solve this as my first bug. But I'm confused with how things work here. Should I just solve it and send a pr?

@Vishal19111999 it's best practise to comment first to let us (and other potential contributors) know you're working on it.

@eviljeff Why is this shown as closed? Why am I assigned if this is closed?

@Vishal19111999 you fixed it!

@eviljeff No, I didn't, It was fixed by probably @yatinmaan

@Vishal19111999 sorry, you're right. I read both emails at the same time and thought you'd submitted the fix.

@eviljeff Can you assign me or just suggest a good first bug ?? It would be a great help...thanks

@Vishal19111999 we don't have any other definite good first bugs right now. We have some "contrib: welcome" issues that we think could be solved by contributors, but they require someone who is more familiar with django and is willing to (self) learn how the addons-server codebase works. (We can help explain the problem if the issue isn't clear, but aren't going to help you through developing the solution)

@eviljeff I have a month of experience in Django...I think with a little googling I would be able to figure things out...could you recommend any welcome bug to me??

@eviljeff I am facing problem setting things up...I have followed the install docks, but yet http://localhost:3000/en-US/firefox/ is returning a blank page...port 80 is also returning the default NginX page...port 8000 is not returning anything...port 3000 is returning 'Connection was reset'
Screenshot from 2019-09-24 10-25-47
Screenshot from 2019-09-24 10-26-04

As I said "we don't have any other good first bugs right now".
This issue is closed. It's not the place to discuss unrelated set up problems. https://wiki.mozilla.org/Add-ons/Contribute/Code talks about what to do and where to get guidance.

Funny thing is that frontend is displaying empty reviews for some time now, but I forgot I had this issue opened 馃檲

This means that, with this patch, the issue is reintroduced - DevHub being the one showing a smaller number of reviews this time.

So, we might need to revert this patch after all...

Re-opening because this is still an issue

Hey @AlexandraMoga, Can I work on this issue. I seem to notice that this was already fixed a year ago but I guess it's still relevant.

@arjunvijayanathakurup it's been re-opened because the behaviour changed (back) on the frontend so this needs to be changed back too. It's pretty much doing the opposite of https://github.com/mozilla/addons-server/pull/12411/files (some of the other code might have changed in the meantime)

It's pretty much doing the opposite of https://github.com/mozilla/addons-server/pull/12411/files (some of the other code might have changed in the meantime)

@eviljeff so basically undoing all the commits made so far and pushing them to a new pull request :thinking: ?

so basically undoing all the commits made so far and pushing them to a new pull request 馃 ?

There was only a single commit. The code needs to be changed back.

I can take this if @leni1 isn't on it.

Verified fixed on -dev. DevHub and the frontend are showing the same number of reviews now (i.e. total ratings)

image

Was this page helpful?
0 / 5 - 0 ratings