mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
127 stars 41 forks source link

Average ratings should be calculated using the latest review for each user only #4204

Closed ValentinaPC closed 7 years ago

ValentinaPC commented 7 years ago

Steps to reproduce:

  1. Leave two reviews to the same add-on on desktop
  2. Go to mobile page of this add-on i.e https://addons.allizom.org/en-US/android/addon/login/?src=ss
  3. Verify the average rating stars

Expected results: Average is calculated correctly.

Actual results: Average is not calculated correct.

Notes/Issues:

Verified on Ff52(Android 6.0.1, Win 7). Issue is reproducing on stage and dev. Video for this issue: videotogif_2017 03 29_17 55 28

ValentinaPC commented 7 years ago

I just observed I've logged it in the wrong place...or...not?

diox commented 7 years ago

No, it's fine: the average rating calculations are done by addons-server.

diox commented 7 years ago

I've got a branch that implements this, but I want to get a second opinion on this.

@jvillalobos doing this will lower the total reviews count (since older reviews from a given user would be ignored) and alter the averages (for the same reason). Does that seem ok to you ? It seems fair to me but at the same time changes the existing behavior, so I'd prefer to check with you.

jvillalobos commented 7 years ago

Yes, it makes ratings more accurate, so I'm okay with it.

diox commented 7 years ago

QA: note that the fix will only be applied once a new review/rating is posted for each affected add-on.