Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Special:WatchAnalytics pages based on user groups #9

Open
jamesmontalvo3 opened this issue Dec 11, 2014 · 3 comments
Open

Filter Special:WatchAnalytics pages based on user groups #9

jamesmontalvo3 opened this issue Dec 11, 2014 · 3 comments

Comments

@jamesmontalvo3
Copy link
Contributor

This can be performed with the following:

SELECT
    CONCAT(p.page_namespace, ":", p.page_title) AS page_ns_and_title,
    SUM( IF(w.wl_title IS NOT NULL, 1, 0) ) AS num_watches,
    SUM( IF(w.wl_title IS NOT NULL AND w.wl_notificationtimestamp IS NULL, 1, 0) ) AS num_reviewed,
    SUM( IF(w.wl_title IS NOT NULL AND w.wl_notificationtimestamp IS NULL, 0, 1) ) * 100 / COUNT(*) AS percent_pending,
    MAX( TIMESTAMPDIFF(MINUTE, w.wl_notificationtimestamp, UTC_TIMESTAMP()) ) AS max_pending_minutes,
    AVG( TIMESTAMPDIFF(MINUTE, w.wl_notificationtimestamp, UTC_TIMESTAMP()) ) AS avg_pending_minutes
FROM
    `watchlist` `w`
RIGHT JOIN `user_groups` `ug` ON
    (w.wl_user = ug.ug_user AND ug.ug_group = "Contributor")
RIGHT JOIN `page` `p` ON
    ((p.page_namespace=w.wl_namespace AND p.page_title=w.wl_title))
GROUP BY p.page_title, p.page_namespace 
ORDER BY num_reviewed,num_watches,num_reviewed,page_ns_and_title
@jamesmontalvo3
Copy link
Contributor Author

Commit 67e58a2 added the ability to filter Watch Analytics page stats based on user groups (cannot yet filter user stats). However, the UI has not yet been created. To filter by user group add to the URL groupfilter=sysop (filter so only admin watches are shown).

@jamesmontalvo3
Copy link
Contributor Author

Commit 628e267 added a select field to filter by user group (thus showing how users in that group are watching the wiki), and 673414e added a select field to filter by page category.

@darenwelsh
Copy link
Contributor

This seems to be functioning on the User watch statistics page, but I'd really like to have this filter feature for the Wiki historical watch statistics page. I'm compiling a year in review for our group and it's not fair to say that our average and max pending review times have increased by the amount including those outside our group. If I could filter to only include data from those in our group, then I could more easily point out how the scrutiny of our products is in decline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants