User:DWalden (WMF)/Watchlist Expiry

Documentation

 * For the project: https://meta.wikimedia.org/wiki/Community_Tech/Watchlist_Expiry
 * General: https://www.mediawiki.org/wiki/Help:Watchlist, https://www.mediawiki.org/wiki/Manual:Watchlist

Finding recent changes

 * Are there any 'Expiring-Watchlist-Items' tasks in QA column of https://phabricator.wikimedia.org/project/view/4718/?
 * There are normally acceptance criteria in the task to give you a start
 * Otherwise, you might need to read the gerrit patch in the task or ask the assigned developer

Core functionality of the Watchlist Expiry project

 * Temporarily watched pages eventually become unwatched

Popular functionality of the Watch/Watchlist in general

 * Watching a page
 * Monitoring changes to watched pages via Special:Watchlist and/or email notifications

Coverage to consider when testing

 * There are lots of places from which you can watch (and often unwatch) pages
 * Toggling the star on a page
 * Special:EditWatchlist (unwatch only)
 * Special:EditWatchlist/raw
 * Special:EditWatchlist/clear (unwatch only)
 * ?action=watch on any page
 * When performing various actions on a page (e.g. editing, moving, etc.)
 * Various API endpoints:
 * https://www.mediawiki.org/wiki/API:Watch
 * Moreover, other APIs allow watching pages as a side-effect (e.g. action=edit)
 * Places to "see" watched items
 * Special:EditWatchlist and Special:EditWatchlist/raw
 * Special:Watchlist
 * https://www.mediawiki.org/wiki/API:Watchlist
 * https://www.mediawiki.org/wiki/API:Watchlist_feed
 * Extension:Notifications(?)
 * Emailed notifications (if enabled)

Oracles

 * Special:Watchlist should(?) show the same changes as Special:RecentChanges, except only for watched pages
 * I have a script to help with this, to some extent
 * ?action=watch on a watched page shows how long the expiry is. Note that it rounds down the number of days, so if there is less than 24 hours less it will say "0 days".
 * Database, if you have access
 * Watched items and their expiry times (if applicable): SELECT * FROM watchlist LEFT JOIN watchlist_expiry ON wl_id=we_item WHERE wl_user= ;
 * This won't show "orphaned" watchlist_expiry rows, you may want to check this with a different query, e.g. (query not tested): SELECT * FROM watchlist_expiry LEFT JOIN watchlist ON we_item=wl_id WHERE wl_id IS NULL;

Other factors to bear in mind

 * Special:Preferences has a "watchlist" tab, from which you can change various watch behaviour, including when pages get watched
 * Special:Preferences "User profile" tab has the option "Email me when a page or a file on my watchlist is changed"
 * Often, the code paths for watching/unwatching are different depending on whether you are (un)watching a single page vs. multiple pages