openbenches.org icon indicating copy to clipboard operation
openbenches.org copied to clipboard

Leaderboard moves edited benches to editor

Open Lextuga007 opened this issue 3 years ago • 5 comments

I corrected one of ukmoose's benches that said Brampton Stoker and should be Bram Stoker and it's now moved to my board. Could the leaderboard be set to count created rather than a last edited field, if that's what is happening?

Thanks

Lextuga007 avatar Sep 26 '20 17:09 Lextuga007

I like that editing increases your score, as I often forget to login, and then moving the anonymous bench a smidgen gets me the credit. Edits should not reduce anyone's score of course.

jrbray1 avatar Aug 22 '21 13:08 jrbray1

I'm thinking about how to implement this - from both a user and database perspective.

Currently, every bench has a single user.

When a bench is edited, the user is changed, and that change is recorded in the benches_history table. That means the original user's count goes down by 1, and the editor's goes up by 1.

When a duplicate bench is merged, the duplicate has published set to 0 and gets an entry in the merged_benches table. Similarly, the submitter of the duplicate bench loses a count, but the original user's count doesn't increase.

When a bench is deleted (usually because there's no inscription, or other quality issues), the bench has published set to 0, and the submitter loses a count.

What do we want in the future?

  • A deleted bench should reduce the user's score. That's pretty uncontroversial. Already implemented.

  • A merged bench - only the original user gets a +1 score. That makes like simple for the database design. But should the duplicate uploader still get a +1?

  • An edited bench The big one! At the moment, there's a 1:1 link between a bench and a user. Whoever last edited the bench gets the point. Without a large database redesign, there's no way to add multiple people to a bench.

Is it worth redesigning the DB to allow 1:N mapping of benches and users? Each image has a unique user - that may be a better metric to track.

Finally - remember, this is all just for fun. The points are meaningless and cannot be redeemed for fabulous prizes!

edent avatar Oct 16 '21 16:10 edent

Approach 1) For each user scan the media structure and extract benchIDs, and count how many unique ones. T|his would omit location edits, and multiple edits to the same bench, but never mind. Would restore all the benches lost by users. Could be slow.if run regularly.

  1. Leave the bench structure alone, and add a new field to the user structure, "changes", which is populated one time with (1), and then incremented whenever a user completes a new action, whether create or edit.

Approach (2) seems better

jrbray1 avatar Oct 16 '21 17:10 jrbray1

NB, the actual list of benches edited per user would need approach 1, but it would occur once per page load, not many times as for the leader board itself.

jrbray1 avatar Oct 16 '21 19:10 jrbray1

Thanks for looking at this again 😸 I was assuming the database would (or could) have a created column and maybe an edit column and that the created would lead to the points.

Lextuga007 avatar Oct 29 '21 15:10 Lextuga007

After much thought...

The new version of OpenBenches ignores who edits a bench.

If @jrbray1 adds a new bench - then it is theirs no matter how many times @Lextuga007 edits it.

Added images will always belong to whoever uploaded them.

The admin (me!) gets a notification with a user ID of whoever edits a bench, it's also recorded in the database. So any malicious edits can be rolled back and users blocked.

I hope that's satisfactory. And thank you for your patience.

edent avatar May 14 '23 20:05 edent

The easiest solution that stops the system being gamed, not that anyone really cares. https://openbenches.org/leaderboard says "Most added and edited benches" which will need changing.

On Sun, 14 May 2023 at 21:08, Terence Eden @.***> wrote:

After much thought...

The new version of OpenBenches ignores who edits a bench.

If @jrbray1 https://github.com/jrbray1 adds a new bench - then it is theirs no matter how many times @Lextuga007 https://github.com/Lextuga007 edits it.

Added images will always belong to whoever uploaded them.

The admin (me!) gets a notification with a user ID of whoever edits a bench, it's also recorded in the database. So any malicious edits can be rolled back and users blocked.

I hope that's satisfactory. And thank you for your patience.

— Reply to this email directly, view it on GitHub https://github.com/openbenches/openbenches.org/issues/228#issuecomment-1546990623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGE3HVIQ5PF6RV7GKGBWN7TXGE3VVANCNFSM4R3AM7VA . You are receiving this because you were mentioned.Message ID: @.***>

jrbray1 avatar May 14 '23 20:05 jrbray1