Page MenuHomePhabricator

[Task] Refactor Special:Recentchanges to use WatchedItemStore
Open, MediumPublic3 Estimated Story Points

Event Timeline

Mainly this bit of code which could probably be swapped out for something in WatchedItemStore straight away

						$dbr->selectField(
							'watchlist',
							'COUNT(*)',
							[
								'wl_namespace' => $obj->rc_namespace,
								'wl_title' => $obj->rc_title,
							],
							__METHOD__ . '-watchers'
						);

Change 283385 had a related patch set uploaded (by Addshore):
Use WatchedItemStore for SP:RC watchers countm

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

So there is some stuff in there which selects with joins on the RC table.
I still don't know what the best approach there is and it may be worth leaving it

@Addshore I have not looked closely, but my intuition is this: Don't move the compelx queries into WatchedItemStore, but into a separate class, WatchedItemQuery or some such. Also split out the UI bit into RCView or ChagnesView or something. The special page should then just glue the view to the query service, and handle parameters. Not sure whether the form should be defiend by the view or the special page itself though.

Change 283385 merged by jenkins-bot:
Use WatchedItemStore for SP:RC watchers count

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

Other than the RC watchlist crossover stuff mentioned above this is all done so moving to done.
The RC / watchlist stuff should likely be done seperatly.

Addshore changed the task status from Open to Stalled.Mar 21 2017, 11:50 AM

Stalled pending resuming work here once wl_id is deployed on wmf sites (T130067).

wl_id now exists but this is still stalled.

Unassigning myself for now.

Aklapper changed the task status from Stalled to Open.Jun 22 2020, 7:55 PM

Stalled pending resuming work here once wl_id is deployed on wmf sites (T130067).

T130067 is resolved hence this task is not stalled anymore. (And mediawiki/core/includes/specials/SpecialRecentChanges.php nowadays has the line MediaWikiServices::getInstance()->getWatchedItemStore()->countWatchers().)