Allow Special:Log to be filtered by log_action as well as log_type
OpenPublic

Description

Author: happy.melon.wiki

Description:
This is probably a dupe, but I couldn't find it, and is related to bug17293. This would probably require a new index on the logging table, action_time, but would be very useful.


Version: unspecified
Severity: enhancement

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz18954.
bzimport created this task.Via LegacyMay 27 2009, 11:46 AM
brion added a comment.Via ConduitMay 27 2009, 5:03 PM

Can you clarify a bit what sort of filtering you'd want and what it might look like from a user interaction perspective?

bzimport added a comment.Via ConduitMay 27 2009, 9:08 PM

happy.melon.wiki wrote:

Initially, extending the dropdown that currently default to "all public logs" to look something like this:

*All public logs
*Block log
Blocks
Unblocks
Modifications
*Protection
Protection
Unprotection
Modifications
*etc

Where a user can select any of the fields: selecting, say "*Block log" would have the same effect as currently: all actions of log_type='block'; but selecting "**Blocks" would display only log entries where log_action='block' (and redundantly, log_type='block'). Of course, this would probably require us to keep a track of exactly what log_action values we're expecting, so we can assign them system messages etc. [[mw:Manual:Logging table]] suggests there're some fairly obtuse values floating around, which might need some cleanup (or at least working out where they came from and what to call them).

Ultimately, it would be nice, in combination with bug17293, to implement a multiple select (a la the selects for status and resolution on bugzilla's advanced search) to select a number of log_types (or, even better, arbitrary log_actions). This would make it much easier to resolve bugs like bug17148 (and the similar one for suppression log entries showing up there, which I can't find), simply by changing LogEventsList::showLogExtract() to disregard these log_actions. But that's a separate issue, and a separate bug.

aaron added a comment.Via ConduitOct 14 2009, 1:17 AM

*** Bug 20839 has been marked as a duplicate of this bug. ***

Krinkle added a comment.Via ConduitApr 11 2011, 10:54 PM

So, in order to be able to effeciently query by log_action, which indexes need to be added or changed ?

Right now there is:

CREATE INDEX /*i*/type_time ON /*_*/logging (log_type, log_timestamp);
CREATE INDEX /*i*/user_time ON /*_*/logging (log_user, log_timestamp);
CREATE INDEX /*i*/page_time ON /*_*/logging (log_namespace, log_title, log_timestamp);
CREATE INDEX /*i*/times ON /*_*/logging (log_timestamp);
CREATE INDEX /*i*/log_user_type_time ON /*_*/logging (log_user, log_type, log_timestamp);
CREATE INDEX /*i*/log_page_id_time ON /*_*/logging (log_page,log_timestamp);

at http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?view=markup&pathrev=84394#l1185

It may take more time for WMF to do this after deployment of the code (since it most likely requires the famous musical dance with the servers), but that should not block the development of this feature.

We should identify the needed changes to the indexes so that development can continue so wikis can use this feature as soon as possible (especially smaller wikis, outside WMF). In addition to the indexes there is much more that will have to be done

  • interface for Special:Log
  • stuff in the API perhaps
  • debugging and optimalization
  • whatever else that can and will go wrong

If we keep postponing this just for the indexes issue, the rest will get blocked too. If it's too dangerious for WMF or if WMF won't be able to do this anytime soon, it could be disabled by default until everything is sorted (like with the category sorting).

Catrope added a comment.Via ConduitApr 12 2011, 9:59 AM

(In reply to comment #4)

So, in order to be able to effeciently query by log_action, which indexes need
to be added or changed ?

Right now there is:
> CREATE INDEX /*i*/type_time ON /*_*/logging (log_type, log_timestamp);

We would need to add (type, action, timestamp) there I guess.

Bawolff added a comment.Via ConduitSep 11 2011, 2:50 AM

Note, the index was added in r93211 by Reedy. Also I believe we already support filtering by action in the api, so all that's left is putting it in the web interface.

bzimport added a comment.Via ConduitDec 21 2012, 4:34 PM

rd232 wrote:

Code was mentioned for this over a year ago. What happened?

Krinkle added a comment.Via ConduitJan 2 2013, 11:02 AM

-"schema-change". Index on log_type and log_action is available since 2011 and API supports it.

e.g. where [[m:Special:Log/newusers]] includes auto creations (which is effectively all WMF accounts globally since meta is in the auto-login) and:

https://meta.wikimedia.org/w/api.php?format=jsonfm&action=query&list=logevents&leaction=newusers/create&leprop=user%7Ctimestamp&lelimit=500

Only includes the "create" account (not CentralAuth autocreate or create2).

Legoktm added a comment.Via ConduitOct 29 2013, 6:37 PM
  • Bug 56329 has been marked as a duplicate of this bug. ***
Nemo_bis awarded a token.Via WebDec 12 2014, 8:21 AM

Add Comment