Page MenuHomePhabricator

[SPIKE] Can we determine what articles a user has edited from their watchlist in the last 30 days?
Closed, ResolvedPublic

Description

The requirements for T292147 say that we will first notify users about articles on their watchlist they have edited in the past 30 days, before moving on to other articles on their watchlist.

This spike is to determine whether it's possible to know those things and access that information when generating notifications.

Acceptance Criteria:

  • Document whether and how we can determine which articles on a user's watchlist they have edited in the past 30 days
  • If possible to determine that information, document whether and how we can access it when generating notifications
  • PM will update acceptance criteria for T292147 based on the above

Event Timeline

CBogen renamed this task from [SPIKE] Can we determine what articles an user has added images to or edited in the last 30 days? to [SPIKE] Can we determine what articles a user has edited from their watchlist in the last 30 days?.Oct 4 2021, 5:08 PM
CBogen updated the task description. (Show Details)
matthiasmullie subscribed.

Apologies for licking the cookie on this task & then not pursuing it for over a week because of other distractions.

Yes, totally possible with this (rather slow - I'm sure it can be optimized or split up during implementation) query, to be executed against the target wiki's DB:

SELECT wl_user, page_id, page_namespace, page_title
FROM watchlist
INNER JOIN actor ON actor_user = wl_user
INNER JOIN page ON page_namespace = wl_namespace AND page_title = wl_title
INNER JOIN revision ON rev_page = page_id AND rev_actor = actor_id
WHERE rev_timestamp > '20220103000000' # this should be "now - 30 days" mwtimestamp
GROUP BY wl_user, page_id;

This will return a list of user ids & the relevant watchlisted page ids they edited in the last however many days.

Unassigning myself & moving to blocked to allow PM to update those acceptance criteria in T292147. I guess this spike can be closed after that.

CBogen claimed this task.

Unassigning myself & moving to blocked to allow PM to update those acceptance criteria in T292147. I guess this spike can be closed after that.

Done, thanks!