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

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 subscribed.

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 moved this task from Product sign-off to Done on the Community-Tech (Kanban-2019-20-Q4) board.
ifried subscribed.

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.