Page MenuHomePhabricator

If a user's file was moved to Commons, their account should be autocreated
Closed, ResolvedPublic5 Story Points

Description

Motivation
When users' files are moved to Commons, they lose the track history of the file in the original wiki. However, it is super important, to keep the files in their contribution lists. The files usually appear in the Commons contribution lists, but in order for that to happen, the user needs to have a commons account.
In T199076 we had argued that the user should not be autocreated for an action that they did not perform. However, it is more important to keep the contribution record than a maybe surprising autcreation.
Right now, user links are in plain text, or redirect to the home wiki if possible.

Acceptance Criteria

  • If the uploader of a file that was moved to Commons does not have a Commons account, it is created for the uploader, and connected to their global account.
  • This also affects all other editors of the file who don't yet have a Commons account

Notes
For now, we are only talking about the page history, not file revision history.
Ideally, there should be an integration test for this.

  • The file history links to the uploader's Commons user page.

Event Timeline

Restricted Application added a project: TCB-Team. · View Herald TranscriptNov 13 2018, 10:27 AM
Lea_WMDE renamed this task from I a user's file was moved to Commons, their account should be autocreated to If a user's file was moved to Commons, their account should be autocreated.Nov 13 2018, 10:28 AM
Lea_WMDE triaged this task as Normal priority.
Lea_WMDE updated the task description. (Show Details)Nov 13 2018, 2:09 PM
Lea_WMDE set the point value for this task to 5.
WMDE-Fisch moved this task from Sprint Backlog to Doing on the WMDE-QWERTY-Sprint-2018-11-20 board.

Change 474952 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/FileImporter@master] Always try to create users in target wiki

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

Pikne added a subscriber: Pikne.Nov 20 2018, 6:25 PM

Isn't this already the case? I'm pretty sure I've triggered account creation for several users, e.g. for this user when importing this file.

Isn't this already the case? I'm pretty sure I've triggered account creation for several users, e.g. for this user when importing this file.

Yeah you're kind of right ;-). - It was the case, then we changed it to not having autocreate and now we came to the conclusion that having the account creation is overall the better option. :-)

Isn't this already the case? I'm pretty sure I've triggered account creation for several users, e.g. for this user when importing this file.

Yeah you're kind of right ;-). - It was the case, then we changed it to not having autocreate and now we came to the conclusion that having the account creation is overall the better option. :-)

Maybe it's helpful or maybe it isn't: I tried this out and I just triggered account creation for this user.

Change 474952 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Always try to create users in target wiki

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

Maybe it's helpful or maybe it isn't: I tried this out and I just triggered account creation for this user.

Yeah looking at it more in detail, that also seems to be true. For file revisions the process was a bit different indeed and it seems that we there still autocreated these accounts there. Well with this patch autocreation will be handled the same for file and text revisions and more importantly we associate the created revisions with the Commons user account. :-)

JJMC89 added a subscriber: JJMC89.Nov 21 2018, 9:01 PM

with this patch autocreation will be handled the same for file and text revisions and more importantly we associate the created revisions with the Commons user account. :-)

I wasn't using the importer much due to imported revisions not being associated with Common's accounts. Thanks for fixing it.

Is there a script (or another method) for associating revisions have already been imported?

with this patch autocreation will be handled the same for file and text revisions and more importantly we associate the created revisions with the Commons user account. :-)

I wasn't using the importer much due to imported revisions not being associated with Common's accounts. Thanks for fixing it.
Is there a script (or another method) for associating revisions have already been imported?

No, at the moment there is no script I know of that does that. - The only way I can think of to doing this right now would be deleting the files on Commons and re-importing them. :-/ ( when the patch is deployed )

Lea_WMDE closed this task as Resolved.Dec 3 2018, 12:55 PM
Lea_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2018-11-20 board.