Page MenuHomePhabricator

Cleanup Watchlist expiry: matching of watchlist_expiry item with removal of a watchlist item
Closed, ResolvedPublic

Description

NOTE: This is a subtask of T245213

As a Watchlist Expiry user, I want make sure that on any removal of a watchlist item, the matching watchlist_expiry item is removed, so that the feature is properly managed and functioning on the back-end.

Acceptance Criteria:

  • Make sure that on any removal of a watchlist item, the matching watchlist_expiry item is removed, including:
    • Removing an item from Special:EditWatchlist
    • Removing from watchlist through the API
    • Removing an item from Special:RawWatchlist
    • Removing an item through the "star" or through ?action=unwatch
  • Make sure that if the item ID from the watchlist table also exists in watchlist_expiry, we delete both entries.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Reedy renamed this task from Cleanup Watchlist expiry: Make sure that on any removal of a watchlist item, the matching watchlist_expiry item is remove to Cleanup Watchlist expiry: Make sure that on any removal of a watchlist item, the matching watchlist_expiry item is removed.Feb 14 2020, 12:16 AM
ifried renamed this task from Cleanup Watchlist expiry: Make sure that on any removal of a watchlist item, the matching watchlist_expiry item is removed to Cleanup Watchlist expiry: matching of watchlist_expiry item with removal of a watchlist item.Feb 18 2020, 11:49 PM
ifried updated the task description. (Show Details)

Whatever is doing the single-item removal could also be used in maintenance/cleanupWatchlist.php, at the moment it does direct DB deletions.

@MusikAnimal @Mooeypoo Is the work for this task done in the same commit as T245213?

Testing the latter, I am finding that watchlist_expiry rows are not removed when deleting an item with Special:EditWatchlist/raw. They are in other ways (EditWatchlist, "star" on the page).

This is with the $wgWatchlistExpiry = true, but does not seem to matter if the expiry time has passed.

MusikAnimal Mooeypoo Is the work for this task done in the same commit as T245213?

Yes, incidentally.

Testing the latter, I am finding that watchlist_expiry rows are not removed when deleting an item with Special:EditWatchlist/raw. They are in other ways (EditWatchlist, "star" on the page).

This is with the $wgWatchlistExpiry = true, but does not seem to matter if the expiry time has passed.

I finally got around to testing this and I could not reproduce the bug. In my case I added items with expiries using the action=watch API with this patch checked out https://gerrit.wikimedia.org/r/c/mediawiki/core/+/580522. I guess we can revisit this bug after that is merged, since it'll be much easier to do testing.

Leaving this task open for now.

Testing the latter, I am finding that watchlist_expiry rows are not removed when deleting an item with Special:EditWatchlist/raw.

Things might have changed since you tested; can you have another crack at it? I can't reproduce this now. watchlist_expiry rows seem to be correctly removed when editing the raw watchlist.

Testing the latter, I am finding that watchlist_expiry rows are not removed when deleting an item with Special:EditWatchlist/raw.

Things might have changed since you tested; can you have another crack at it? I can't reproduce this now. watchlist_expiry rows seem to be correctly removed when editing the raw watchlist.

Yeah, for me too now. MediaWiki 1.35.0-alpha (a0b8a24).

  • Removing an item from Special:EditWatchlist
  • Removing from watchlist through the API
  • Removing an item from Special:RawWatchlist
  • Removing an item through the "star" or through ?action=unwatch

I have retested all of these, checking that the appropriate row is removed from watchlist_expiry (verified by looking in the database).

I have also tested Special:EditWatchlist/clear, where you can completely clear your watchlist.

Tested on https://en.wikipedia.beta.wmflabs.org (MediaWiki 1.35.0-alpha (6870c21) 08:41, 27 April 2020).

ifried moved this task from Product sign-off to Done on the Community-Tech (Kanban-2019-20-Q4) board.
ifried subscribed.

This has been tested, so I'm marked this as Done.