Closed Bug 435263 Opened 17 years ago Closed 17 years ago

Enforce one review per user per add-on (block duplicates, spam, repeat reviews)

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: wenzel, Assigned: lorchard)

References

Details

Attachments

(1 file)

The review queue occasionally shows duplicate reviews, likely from people pressing "reload" when their internet connection lags. We need to make sure every user just reviews an add-on once. An easy way to enforce this in the database would be putting a UNIQUE index on (user,version).
A few things to consider about this, which I think is an important bug to resolve. * Getting rid of the existing dupes - I think keeping the latest review by default is the easy option, but it might be more polite to allow users to choose from all of the ones they've submitted which one will be visible to the public and count towards the average star rating. - you could do that if instead of having a unique index on (user,version) you added a flag to say "current", and indexed (user,version,current) * From a UI perspective, what's best? I think replace the bits that allow you to enter a review with bits that allow you to edit your existing review? * Some people will want to update their reviews or submit new ones after an add-on has been updated, and that's fine. There *might* be value in showing the old reviews as part of the historical record, but the star value should definitely not count twice, and arguably the easiest thing to do is force them to edit their one and only review.
Blocks: 435156
Target Milestone: --- → 3.4.7
Summary: Block duplicate review submissions → Enforce one review per user per add-on (block duplicates, spam, repeat reviews)
Per clouserw...for your consideration...
Assignee: nobody → lorchard
Some feedback from an end user about how this currently operates: From: Alan Sargent <alan_r_sargent at yahoo.com>: I have given a review of a Firefox add on. When I downloaded a later version and wanted to make comments on that version, I found I had not made a new review, but that my new comment replaced my original review. This was a bit annoying, especially as the "new" review still carries the date of the old one, so it makes little sense now, and the developer had added comments to my old review which are also now out of context. Is this supposed to prevent spamming of reviews? It has unfortunate side effects if so. ================ We may want to consider offering users the chance to either edit their existing comment (pre-filled with the current content) and when we replace, we update the modified/creation/submit date.
Target Milestone: 3.4.7 → 3.5.1
Alan Sargent's comment suggests that action was taken on this bug, but I note that on https://addons.mozilla.org/en-US/firefox/addon/4490 there are two very recent reviews from the same user, so maybe action was taken and then reverted? I have a new idea about how to tackle this one that seems reasonably simple and elegant: * Allow multiple reviews per user. Hence no need to figure out what to do about existing dupes. * Only show the *latest* review by any given user in the reviews list. * If there is more than one review by that user, then show a link under the review with wording "see [X] previous review[s] of this add-on by [username]", and show those reviews in an expanding DIV when the link is clicked. * Only consider each user's most recent review when calculating the average rating of the add-on. On the subject of average ratings, probably worth considering Bug 291413 in combination with this one. * The total review count for the addon should probably become the total "reviewer" count? That's not so important IMO, but it might clear up any confusion caused when people try to calculate the average rating.
Priority: -- → P2
getting this into my todo list
Status: NEW → ASSIGNED
This patch should cover comment 6 like so: * Multiple reviews are allowed, but only the latest is shown. * AJAX-powered links can be used to reveal a user's previous reviews. * Review totals reflect reviewer count, and not all reviews. * Only the latest rating per user is used in calculating the average rating.
Attachment #341725 - Flags: review?(rdoherty)
Comment on attachment 341725 [details] [diff] [review] Hide all but latest review per user, with AJAX reveal. Also, only count latest rating toward average. Looks good and works well. Bonus points for graceful degradation :) There's a typo: 'chronlogical' in models/review.php should be chronological. The only small tweak I'd suggest is delineating the older reviews somehow. Maybe indenting them 30-40px?
Attachment #341725 - Flags: review?(rdoherty) → review+
Checked in as r18878, with Ryan's suggestions
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
FWIW, an addon I've been using to see this patch in action is this one, which has a few users with multiple reviews submitted: https://preview.addons.mozilla.org/en-US/firefox/reviews/display/4490?show=100
Verified FIXED. This is hot stuff; I tested with JS disabled and enabled, and it worked fine in both cases. Tested multiple reviews and their deletion, as well, of course.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: