Page MenuHomePhabricator

Allow action blocks to be logged via block log parameters
Closed, ResolvedPublic3 Estimated Story Points

Description

When a user is blocked, a log entry is made. These logs are visible at Special:Log by filtering to the "Block log". Details of page/namespace blocks are included in these log entries; details of action blocks should be too.

Technical details

When a new DatabaseBlock is made, a log entry is created in BlockUser::log. Block parameters are added to the log entry in BlockUser::constructLogParams. We should add action block details here.

Event Timeline

Change 684139 had a related patch set uploaded (by TsepoThoabala; author: TsepoThoabala):

[mediawiki/core@master] Allow action blocks to be logged via block log parameters

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

Change 684139 merged by jenkins-bot:

[mediawiki/core@master] Allow action blocks to be logged via block log parameters

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

dom_walden subscribed.

I tested how blocks look in Special:Log/block and action=query&list=logevents.

For example, in Special:Log:

action_block_log_entry_simple.png (48×1 px, 17 KB)

And corresponding API entry: https://en.wikipedia.beta.wmflabs.org/w/api.php?action=query&list=logevents&lestart=2021-05-06T08:43:00Z&leend=2021-05-06T08:44:00Z&ledir=newer

Here's a more complicted example in Special:Log, a block with many different restrictions:

action_block_log_entry.png (70×1 px, 28 KB)

And corresponding API entry: https://en.wikipedia.beta.wmflabs.org/w/api.php?action=query&list=logevents&lestart=2021-05-06T08:53:00Z&leend=2021-05-06T08:54:00Z&ledir=newer

I also tested how log entries look in CheckUser's Special:Investigate/Timeline. They look very much the same as in Special:Log. For example:

action_block_log_entry_checkuser.png (236×1 px, 105 KB)

Test Environments: