2019 EDIT: This extension has been archived as I didn’t actually maintain it. I still think there might be room for a more flexible version of this extension in the future.
MassAction is a Mediawiki extension that allows users to perform mass actions on targets through a special page making use of the job queue. Its development started at some point in 2014 and a very rough experimental version is now available. Below are the basics.
- Tasks are individual mass actions, comprised of smaller actions that are applied to multiple targets using matchers, for example replace the word ‘hello’ with ‘goodbye’ on all wiki pages with a title that contains the word ‘Language’ for pages that are not redirects.
- Actions are processes that can be applied to Targets to alter some of the data that they contain, for example, change the title (move), change an article text etc.
- Matchers or Filters are sets of rules that are used to match certain targets, for example all articles that contain the word ‘hello’.
All of these concepts are stored in new database tables (seen below).
The main interaction with the extension is done through a special page. This page allows the creation of tasks as well as the viewing of previously created tasks and various actions such as saving changes.
A wire frame showing task creation can be seen below This allows for basic information about the task such as what type of target we want to change, this could be an Image, Article, Wikibase item etc. It also allows for a summary of the changes that will be made.
The lower sections of the page allow for the input of an unlimited number of Actions and Matchers/Filters to be added.
The version of the special page that allows users to view tasks is slightly different and can be seen below.
The main differences here are that no new data can be added, it is simply presented. And also a Task state and list of targets is now present.
Upon creation of a Task the Task will make its way through various states (seen below).
Once the targets have been found they will appear in the targets list on the special page and users will be able to either save changes individually or save a whole list of changes.
A screenshot of the current special page for task creation can be seen to the right.
Of course at this early stage lots of things are missing and I hope I find the time to work on this over the next year:
- T98605 no such function: REGEXP sqlite
- T96592 Provide more information when jobs fail due to exceptions
- T96418 Localize all messages and most strings
- T96417 More Logging – Log on all state changes
- T96416 Implement generic Task options which depend on which actions are used
- T96411 Special:MassAction should have a box allowing selection of Task to view
- T96409 Page to display all tasks filtered by their state
- T96407 Show Logs about a specific task on the task details page
- T96406 Add ability to revert all changes make by a task
- T96405 Add ability to revert all changes made to a single target (from a given task)
- T96403 Convert Save buttons to use API rather than form submit
- T96401 Add permissions
- T96400 Allow regeneration of target lists if nothing has been saved
- T96399 Allow changing of Task Matchers if nothing has been saved
- T100105 Create extension.json for MassAction
- T100103 Validate title on moves to avoid fatals / odd moves
- T100102 Use PSR logging instead of wfdebuglog