Page MenuHomePhabricator

Remove watchlist expired items from WatchedItemStore clearUserWatchedItems method
Closed, ResolvedPublic

Description

The class WatchedItemStore has a function clearUserWatchedItems that is used to removed a user's watched items from the store by deleting related rows from watchlist table. The function needs to delete the items from the watchlist_expiry table as well.

Event Timeline

HMonroy created this task.Apr 2 2020, 9:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 2 2020, 9:47 PM

Change 587394 had a related patch set uploaded (by HMonroy; owner: HMonroy):
[mediawiki/core@master] Remove expired items in WatchedItemStore::clearUserWatchedItems

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

Change 587394 merged by jenkins-bot:
[mediawiki/core@master] Remove expired items in WatchedItemStore::clearUserWatchedItems

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

dom_walden added a subscriber: dom_walden.

Examining the code, this change only affects (@HMonroy correct me if I am wrong):

  • EditWatchlist/clear
  • EditWatchlist/raw

Both of which have been tested recently in T245224.

@dom_walden This code only affects a test in WatchedItemStoreIntegrationTest.php (https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/097c6b575d44848f6531a84c5556a7ca2ab507a7/tests/phpunit/includes/watcheditem/WatchedItemStoreIntegrationTest.php#198).

EditWatchlist/clear and EditWatchlist/raw have their own clearUserWatchedItems function, which was indeed tested in T245224

ifried closed this task as Resolved.Jun 10 2020, 1:12 AM
ifried moved this task from Product sign-off to Done on the Community-Tech (Kanban-2019-20-Q4) board.
ifried added a subscriber: ifried.

This ticket does not have anything specifically user-facing, but it impacts T245224 (which has been tested & confirmed to function properly). I'm marking this work as Done.