lahwaacz/wiki-scripts

statistics: fix user counts in table intro

Closed this issue · 1 comments

The user counts may not be correct in some cases, e.g. here the table shows less than 70 users with more than 50 recent edits as claimed in the intro.

Uh true... Setting the minimum number of recent changes is one of the last features that I introduced, certainly after showing the counts in the intro: the count of the users with more than N recent edits was — and still is — assuming that N==1, i.e. the count is only broken when N!=1.
Now, unfortunately I can't think of any elegant ways to fix this bug: if we want to keep the counts (i.e. not drop them nor only show them when N==1), I'm afraid we have to increment a counter after

recenteditcount = rcusers[user["name"]]
with an additional if recenteditcount >= self.MINRECEDITS:.