Page MenuHomePhabricator

Add the nowcommons template to the source wiki if requested
Closed, ResolvedPublic8 Story Points

Description

Mock


Texts

You can declare on the source wiki that this file has been imported to <target wiki>. This is done by adding a {{<template name>}} template to the original file page in your name.

  • mark source wiki file as imported to <target wiki>

Acceptance Criteria

  • Add a new section on the preview page as shown in the mock, which allows people to decide whether or not they want to inform the source wiki about the file move.
  • By default, the checkbox is set to “do the automated edit”
  • If the field is clicked and the transfer was successful, the edit is done automatically
  • The edit should be made in the name of the moving user, with the edit summary “This file is now on Wikimedia Commons (moved with FileImporter).”
  • This ticket does not include an changes to the success message handling.

Details

Related Gerrit Patches:
operations/mediawiki-config : masterEnable FileImporter source wiki edit and delete
mediawiki/extensions/FileImporter : wmf/1.34.0-wmf.13Fix bug involving file renaming and centralauth cleanup/delete
mediawiki/extensions/FileImporter : masterFix bug involving file renaming and centralauth cleanup/delete
mediawiki/extensions/FileImporter : masterRemove misplaced comma
mediawiki/extensions/FileImporter : masterOption to edit source wiki should be enabled by default
mediawiki/extensions/FileImporter : masterInclude a newline with the template, so it always appears on its own line.
operations/mediawiki-config : masterEnable experimental FileImporter features on labs
mediawiki/extensions/FileImporter : masterAssert status after post-import edit
mediawiki/extensions/FileImporter : masterTests for source wiki editing
mediawiki/extensions/FileImporter : masterAllow automatic adding of the NowCommons template to the source wiki
mediawiki/extensions/FileImporter : masterPost import handler does our success lifting
integration/config : masterAdd CentralAuth to FileImporter required extensions
mediawiki/extensions/FileImporter : master[WIP] UI elements to confirm source wiki edits

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
WMDE-Fisch changed the point value for this task from 8 to 5.Jun 26 2019, 12:36 PM
WMDE-Fisch changed the point value for this task from 5 to 8.
WMDE-Fisch moved this task from Sprint Backlog to Doing on the WMDE-QWERTY-Sprint-2019-06-26 board.

Change 386205 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/FileImporter@master] [WIP] Set notice in file on the source wiki

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

Change 519415 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/FileImporter@master] [WIP] Post import handler does our success lifting

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

Change 519415 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Post import handler does our success lifting

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

@JStrodt_WMDE @Lea_WMDE
What text should be presented to the user on a successful import with a successful source wiki template-addition?

@WMDE-Fisch As I understand it, that's included in T226075. @Lea_WMDE Correct?

@WMDE-Fisch As I understand it, that's included in T226075. @Lea_WMDE Correct?

Ah yeah, sorry I kind of overlooked that. Using The file has been successfully imported to <target wiki name>. from T226075 now.

So last message I'm missing:

For the case, that the user wants the auto source edit, but for some reason the auto source edit fails, I would then show this message
The import was successful. To declare that the file is now on <target wiki name>, please return to [[the original file]] and add this template: {{<template name>}}.
but would also want to show a warning, that the auto edit failed. Something along the lines of
Editing the source wiki automatically was not possible please follow the instructions above.

( the "warning" about the failed source wiki edit will be shown underneath the success message )

@JStrodt_WMDE

@WMDE-Fisch: I would prefer the error message to appear before describing the next step. How about this?

The import was successful, but the template {{<template name>}} could not be added automatically on the source wiki. Please return to [[the original file]] and manually add {{<template name>}} to declare that the file is now on <target wiki name>.

Question: Can we give more specifics about why the source wiki couldn't be edited automatically?

Question: Can we give more specifics about why the source wiki couldn't be edited automatically?

If that is not a 5 minute task, but we could theoretically do it, could you please create another ticket for it?
Thanks :)

awight added a subscriber: awight.Jul 2 2019, 8:16 AM

Question: Can we give more specifics about why the source wiki couldn't be edited automatically?

If that is not a 5 minute task, but we could theoretically do it, could you please create another ticket for it?
Thanks :)

I'll split this into a new ticket, because this task's work is otherwise complete, and we have the same question for T226532.

Change 386205 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Allow automatic adding of the NowCommons template to the source wiki

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

Change 519294 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/FileImporter@master] Tests for source wiki editing

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

Change 520217 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/FileImporter@master] Assert status after post-import edit

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

Change 520234 had a related patch set uploaded (by Awight; owner: Awight):
[operations/mediawiki-config@master] Enable experimental FileImporter features on labs

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

Change 519294 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Tests for source wiki editing

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

Change 520217 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Assert status after post-import edit

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

Change 520234 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable experimental FileImporter features on labs

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

awight added a comment.Jul 3 2019, 1:16 PM

Minor bug report: We should include a newline before the template, here's an example edit:
https://de.wikipedia.beta.wmflabs.org/w/index.php?title=Datei:Green_Test.png&diff=24510&oldid=22444

Change 520438 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/FileImporter@master] Include a newline with the template, so it always appears on its own line.

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

Change 520447 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/FileImporter@master] Option to edit source wiki should be enabled by default

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

Change 520438 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Include a newline with the template, so it always appears on its own line.

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

Change 520447 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Option to edit source wiki should be enabled by default

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

I don't manage to test this before my vacation anymore, my newly created account has too few rights, and my actual one too many :/ Could you please self test this one? Thank you!

Pikne added a subscriber: Pikne.Jul 6 2019, 7:21 PM

Tiny note from translator: comma seems to be misplaced in message "Editing, the source wiki automatically was not possible please follow the instructions above."

Change 521227 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/FileImporter@master] Remove misplaced comma

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

Tiny note from translator: comma seems to be misplaced in message "Editing, the source wiki automatically was not possible please follow the instructions above."

Thanks. I uploaded a fix for it.

Change 521227 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Remove misplaced comma

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

Change 522052 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/FileImporter@master] [WIP] Fix bug involving file renaming and centralauth cleanup/delete

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

Change 522052 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Fix bug involving file renaming and centralauth cleanup/delete

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

Change 523618 had a related patch set uploaded (by Awight; owner: Andrew-WMDE):
[mediawiki/extensions/FileImporter@wmf/1.34.0-wmf.13] Fix bug involving file renaming and centralauth cleanup/delete

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

Change 523661 had a related patch set uploaded (by Awight; owner: Awight):
[operations/mediawiki-config@master] Enable FileImporter source wiki edit and delete

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

Change 523618 abandoned by Awight:
Fix bug involving file renaming and centralauth cleanup/delete

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

Planning to enable in production on Monday, July 22nd.

Change 523661 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable FileImporter source wiki edit and delete

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

Mentioned in SAL (#wikimedia-operations) [2019-07-22T11:13:05Z] <awight@deploy1001> Synchronized wmf-config/CommonSettings.php: SWAT: [[gerrit:523661|Enable FileImporter source wiki edit and delete (T225617, T226532)]] (duration: 00m 56s)

Mentioned in SAL (#wikimedia-operations) [2019-07-22T11:14:36Z] <awight@deploy1001> Synchronized wmf-config/CommonSettings-labs.php: SWAT: [[gerrit:523661|Enable FileImporter source wiki edit and delete, (remove labs customizations) (T225617, T226532)]] (duration: 00m 54s)

This ran into blocking bug T228851: Source wiki editing and deletion always fails, but otherwise should be code complete.

awight updated the task description. (Show Details)
awight moved this task from Sprint Backlog to Demo on the WMDE-QWERTY-Sprint-2019-09-10 board.

Verified by import from test2 to testwiki:

Import preview page on testwiki:

Automatic edit on test2 wiki:
https://test2.wikipedia.org/w/index.php?title=File:038pro01.jpg&oldid=409672

Destination file on testwiki:
https://test.wikipedia.org/w/index.php?title=File:038pro01.jpg&oldid=402873

awight closed this task as Resolved.Sep 25 2019, 12:59 PM