Page MenuHomePhabricator

Watchlist Expiry: Add support to maintain behavior when moving pages [Medium]
Closed, ResolvedPublic

Description

As a Watchlist Expiry user, I want to watch both the new and original page (when moved) for the identical specified amount of time, so that the behavior can match that of permanently watched pages during a move.

Background: Right now, when a page is moved, all watchers automatically watch the new page and the original page. Now, with the addition of watchlist expiry, if a page is moved, we want the same functionality in place (except for temporary watches). Otherwise, a temporarily watched page will become a permanently watched page upon it being moved. This ticket is only for the back-end support of moving for temporary watches (which is MVP for release). The ticket to allow watching in the UI [TBD].

The same issue exists when moving pages via the API. When moving a page using the API and the new page is meant to be watched (e.g. watchlist=watch), but you don't provide an expiry, the new page is always watched indefinitely. It does not use the expiry of the old page, if one existed.

Acceptance Criteria:

  • Add support so, that when a page is moved, all temporary watchers continue to watch the new page and original page for the temporary watch period
  • Do not change functionality or behavior for permanently watched users

Event Timeline

ARamirez_WMF renamed this task from Watchlist Expiry: Add support to maintain behavior when moving pages [placeholder] to Watchlist Expiry: Add support to maintain behavior when moving pages [Medium].Jul 8 2020, 6:55 PM
ARamirez_WMF moved this task from Needs Discussion to Up Next (May 6-17) on the Community-Tech board.
MusikAnimal added subscribers: HMonroy, MusikAnimal.

Per our conversation on Slack, I'll be taking this over since work hadn't started and my patch for T258307 has some overlap

Change 613766 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/core@master] Default to using watchlist expiry of old page when moving pages

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

Change 613766 merged by jenkins-bot:
[mediawiki/core@master] Default to using watchlist expiry of old page when moving pages

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

Change 618585 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/core@REL1_35] Default to using watchlist expiry of old page when moving pages

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

Change 618585 merged by jenkins-bot:
[mediawiki/core@REL1_35] Default to using watchlist expiry of old page when moving pages

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

dom_walden subscribed.

Testing moving via the UI (Special:MovePage/$page).

If I move a page being watched, the watch status and expiry are preserved for the original page and copied over to the new page for all users watching that page. (Expiries that have expired also get preserved and copied).

move_options.png (529×764 px, 35 KB)

There are a couple of options when watching a page:

  • Leave a redirect behind (if you have appropriate permissions)
  • Watch source page and target page

Whether "Leave a redirect behind" is checked or not the watch status and expiries are still preserved and copied. If you leave it unchecked you delete the original page, but users remain watching the deleted page.

Again, whether "Watch source page and target page" is checked or unchecked does not affect the behaviour. The only exception is, if I am watching the page I am moving and uncheck that option, I will no longer be watching the original page (but will be watching the new page, expiry copied if applicable). All other users' watches are preserved/copied for the original and new page.

This is the same bug as T258187, which we have decided not to fix.

In case of regression, I disabled watchlist expiry (on my local vagrant 1.36.0-alpha (72d98b4)) and moved a page which had two users watching. The watches were preserved/copied and there were no errors in the logs.

I tested this mainly on https://en.wikipedia.beta.wmflabs.org (1.36.0-alpha (35acc32) 06:18, 12 August 2020), moving pages that have multiple users watching permanently and temporarily.

I have tested this on testwiki, as well. When I moved a page, the original and new page both preserved the remaining watch period, and I could see the entries (with indication of days left in the watch period) for both pages in Edit:Watchlist. As Dom noted, T258187 is longstanding behavior, and we will not be fixing it in the scope of this project. I'm marking this work as Done.