Page MenuHomePhabricator

P7. Contributions with Flow aren't included in a user's edit count
Closed, ResolvedPublic2 Estimated Story Points

Description

Because Flow is in a separate database, Flow contributions are not automatically included in a user's edit-count at the relevant wikis. Eg.
http://tools.wmflabs.org/xtools/pcount/index.php?name=quiddity+%28WMF%29&lang=test&wiki=wikipedia
vs
https://test.wikipedia.org/wiki/Special:Contributions/Quiddity_%28WMF%29

Can they be added, somehow?


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:53 AM
bzimport set Reference to bz61887.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to Quiddity from comment #0)

Because Flow is in a separate database [...]

Try to avoid this type of diagnosing when reporting bugs. Incrementing MediaWiki core's user.user_editcount database field is not really related to where the Flow data is stored.

This was by design - we didn't want to include them in the edit count because they're not edits :) But yes, at some point I suppose we should add a new Flow contributions field to the relevant tables.

We'd like to put this in the edit count field so the existing tools can be used. We'll probably have to do a one-time maintenance script, then keep it updated going forward.

DannyH renamed this task from Flow: Contributions with Flow aren't included in a user's edit count to [2] Flow: Contributions with Flow aren't included in a user's edit count.Feb 2 2015, 7:08 PM
DannyH renamed this task from [2] Flow: Contributions with Flow aren't included in a user's edit count to Flow: Contributions with Flow aren't included in a user's edit count.
DannyH edited a custom field.

Figure out what has to happen when post moderated (edit count decreases?)

Figure out what has to happen when post moderated (edit count decreases?)

I don't think the edit count is ever supposed to decrease, at least when a 'normal' page gets deleted.

DannyH renamed this task from Flow: Contributions with Flow aren't included in a user's edit count to P7. Contributions with Flow aren't included in a user's edit count.Feb 4 2015, 6:55 PM

Figure out what has to happen when post moderated (edit count decreases?)

I don't think the edit count is ever supposed to decrease, at least when a 'normal' page gets deleted.

I agree. This is documented at https://www.mediawiki.org/wiki/Manual:User_table#user_editcount .

gerritbot subscribed.

Change 189510 had a related patch set uploaded (by Matthias Mullie):
Increase editcount for Flow contributions

https://gerrit.wikimedia.org/r/189510

Patch-For-Review

Tnegrin subscribed.

Kevin -- just an FYI; edit counts may jump

Change 189728 had a related patch set uploaded (by Matthias Mullie):
Increase editcount for existing Flow revisions

https://gerrit.wikimedia.org/r/189728

Patch-For-Review

Change 189510 merged by jenkins-bot:
Increase editcount for Flow contributions

https://gerrit.wikimedia.org/r/189510

Change 189728 merged by jenkins-bot:
Increase editcount for existing Flow revisions

https://gerrit.wikimedia.org/r/189728

Where/how would we test this?

I tried at beta, and got these results (after a helpful pointer to the API by krenair)

I think the API is how most of the editcounters work, but not sure. (Although historically each of the edit counters has given slightly different results. Partially based on counting deleted edits or not. I forget the other variables.)

Where/how would we test this?

To make it work in production, we will need to run a maintenance script (T89772). I've been trying to run the maintenance script in Beta, but am running into unrelated permission issues. It would indeed be preferable to get this working on Beta first.

I think the API is how most of the editcounters work, but not sure. (Although historically each of the edit counters has given slightly different results. Partially based on counting deleted edits or not. I forget the other variables.)

Yeah, they all work somewhat differently. This is specifically about the editcount (which is openly not super-accurate even for standard pages, since it e.g. doesn't drop for deleted edits) that's part of core, documented at https://www.mediawiki.org/wiki/Manual:User_table#user_editcount .

That is the one output by the API.

Success! (post script-run) I'm getting 90 edits from that API query now. http://en.wikipedia.beta.wmflabs.org/w/api.php?action=query&list=users&ususers=Quiddity&usprop=editcount
Thanks.
(I guess I'll leave this open, until the script has been run on the other wikis)

(I guess I'll leave this open, until the script has been run on the other wikis)

The script still needs to be run at some wikis. E.g.
https://test.wikipedia.org/w/api.php?action=query&list=users&ususers=Quiddity_%28WMF%29&usprop=editcount (says "4" edits)
vs
https://test.wikipedia.org/wiki/Special:Contributions/Quiddity_%28WMF%29 (actually 14 edits)