Page MenuHomePhabricator

Watchlist query api should report time remaining
Closed, ResolvedPublic

Description

As a developer,
When I query the api for a user's watchlist (action=query&list=watchlist)
I want to be able to know if those watchlist entries will expire (and if so, when)

Use case: T263665: Add handling for expiring watchlist items on Special:GlobalWatchlist

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Expiring-Watchlist-Items team if this is approved from a product point of view, I can write the code for it; just wanted to make sure first.

@ifried @dom_walden is this okay with the expiring watchlist items team?

@DannyS712 I will ask the team & get back to you. Thanks!

@DannyS712 We have discussed this as a team, and you can go ahead with the work. Thank you so much!

@DannyS712 We have discussed this as a team, and you can go ahead with the work. Thank you so much!

I plan to implement this as a separately requested prop - is that okay, or should it be included in the default?

I plan to implement this as a separately requested prop - is that okay, or should it be included in the default?

wlprop, I assume you mean? I guess that makes the most sense. Performance-wise it's fine if we always show it (behind the scenes we JOIN on watchlist_expiry regardless), but I suppose most consumers won't care about expiries so maybe best to only show it when requested so as to reduce clutter.

Change 642096 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] ApiQueryWatchlist: Allow requesting expiry

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

@DannyS712 We have discussed this as a team, and you can go ahead with the work. Thank you so much!

Okay, thanks. Patch is ready for review: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/642096

Change 642096 merged by jenkins-bot:
[mediawiki/core@master] ApiQueryWatchlist: Allow requesting expiry

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

Change 643158 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] WatchedItemQueryService: Add expiry to items

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

@DannyS712 We have discussed this as a team, and you can go ahead with the work. Thank you so much!

Okay, thanks. Patch is ready for review: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/642096

Patch didn't actually work, since the watched item objects never had the expiry to provide. Fix at https://gerrit.wikimedia.org/r/643158

Change 643158 merged by jenkins-bot:
[mediawiki/core@master] WatchedItemQueryService: Add expiry to items

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

DannyS712 claimed this task.
DannyS712 removed a project: Patch-For-Review.