Script to restore user's deleted reading lists
Closed, ResolvedPublic2 Estimated Story Points

Description

A user lost over a thousand synced saved articles in their iOS app. Upon further inspection of the backend, it seems like a teardown occurred, and that many of the user's reading lists are soft deleted. Due to the 30-day purge rule, we would like to either:

  1. Extend the purge rule out further so that this user's deleted lists are not lost at the end of the month or:
  2. Restore this user's reading lists.

Background:
https://phabricator.wikimedia.org/T431140
https://wikimedia.slack.com/archives/C06UBL7NBFT/p1783517125712979

QA

  • Save some pages to the "default list" and also can create some custom lists (and some entries) via the reading list apis (can use python scripts https://gitlab.wikimedia.org/aude/reading-lists-pywikibot). Special:ReadingLists should now have items.
  • Call the list teardown api endpoint and Special:ReadingLists should now be empty.
  • Then run the maintenance script: php maintenance/run.php ReadingLists:RestoreUserReadingLists --central-id=N --list-ids=1,2,3 (optionally with --dry-run)
  • The saved pages should appear again on Special:ReadingLists

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
aude set the point value for this task to 2.Tue, Jul 28, 5:33 PM
aude renamed this task from Pause purge or restore missing reading lists to Script to restore user's deleted reading lists.Tue, Jul 28, 5:54 PM
aude claimed this task.

Change #1319538 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/ReadingLists@master] Add restoreUserReadingLists.php maintenance script

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

Change #1319538 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Add restoreUserReadingLists.php maintenance script

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

We will create a new task for running the script, then close this task

Here is a task for running the script for the affected user: https://phabricator.wikimedia.org/T434018