Page MenuHomePhabricator

Refactor SpecialPages for Watchlist to use WatchedItemStore
Closed, ResolvedPublic5 Estimated Story Points

Description

Could be refactored into a WatchedItemStore:

  • SpecialWatchlist
  • SpecialEditWatchlist

Event Timeline

Addshore set the point value for this task to 5.

Change 276446 had a related patch set uploaded (by Addshore):
Add clearWatchedItems to WatchedItemStore

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

Change 277262 had a related patch set uploaded (by Addshore):
Use WatchedItemStore::countWatchers in SpecialWatchlist

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

Change 277276 had a related patch set uploaded (by Addshore):
Add WatchedItemStore::countWatchedItems

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

Change 277436 had a related patch set uploaded (by Addshore):
Use WatchedItemStore in SpecialEditWatchlist

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

Change 277444 had a related patch set uploaded (by Addshore):
Use WatchedItemStore::removeWatch in SpecialEditWatchlist

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

Change 277262 merged by jenkins-bot:
Use WatchedItemStore::countWatchers in SpecialWatchlist

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

Change 277276 merged by jenkins-bot:
Add WatchedItemStore::countWatchedItems

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

Change 277444 merged by jenkins-bot:
Use WatchedItemStore::removeWatch in SpecialEditWatchlist

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

Change 277675 had a related patch set uploaded (by Addshore):
Add WatchedItemStore::getWatchedItemsForUser

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

Change 277772 had a related patch set uploaded (by Addshore):
Use WIS:addWatchBatch in SpecialEditWatchlist

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

So most of this now has patches up. Still to go are:

  • The clearing methods in the edit wacthlist page may be blocked
  • The use in SpecialWatchlist::doMainQuery which joins on the recentchanges table and involves 2 hooks and just generally has lots of options and things..
Addshore updated the task description. (Show Details)

Okay, right now I think I would class this task as all in review.
The clearing stuff will not be complete until the wl_id field is on all production dbs
and the doMainQuery method on SpecialWatchlist should probably stay as it is for now, trying to factor this out quickly would likely lead to lots of pain.

Change 277675 merged by jenkins-bot:
Add WatchedItemStore::getWatchedItemsForUser

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

Change 277772 merged by jenkins-bot:
Use WIS:addWatchBatchForUser in SpecialEditWatchlist

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

I believe this is all done except for T132564 which is tracked seperatly

Change 277436 merged by jenkins-bot:
[mediawiki/core@master] Use WatchedItemStore clearing in SpecialEditWatchlist

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