Page MenuHomePhabricator

Remove watchlist expired items from WatchedItemStore clearUserWatchedItems method
Closed, ResolvedPublic


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

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

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

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 (

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

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.