Page MenuHomePhabricator

Allow manual tagging of admin actions
Open, LowestPublic


It is difficult to keep track of admin actions by reason, which is particularly relevant for page and revision deletions, but also for protections and blocks. We have a native drop down menu with default summaries that admins can select. Those are specified in mediawiki messages, respectively Deletereason-dropdown, Revdelete-reason-dropdown, Protect-dropdown (also used for pending changes) and Ipbreason-dropdown.

I think we should allow attaching of one tag (or maybe more than one) to each of the dropdown item, simply by editing those mediawiki pages, provided the tags are defined at Special:Tags (more on this at T20670). The tag(s) to apply may be specified after each dropdown item, separated by a special character sequence, say /*/ (we may not need to modify Xml::listDropDown, the tag may be left apparent in the menu). There should also be a way to specify an "Other reason" tag (when no drop down item is selected).

When an action is performed with a drop down item, the text of wpDeleteReasonList is split into the reason text (before /*/) and the tag(s) to apply (after /*/); there is a check that the tag(s) is(are) defined, and the action is tagged.

One issue is that the 'delete' button is often replaced via javascript with a version where wpReason is prefilled with one of those reasons, such as when there is a speedy deletion tag or AFD template. It wouldn't work for those, but it may be fixed by allowing pre-selection of a wpDeleteReasonList option in urls. The function Xml::listDropDown already contains a 'selected' parameter, so it may be filled at Article.php with a url param.

Event Timeline

Cenarium raised the priority of this task from to Needs Triage.
Cenarium updated the task description. (Show Details)
Cenarium added subscribers: Cenarium, TTO, Anomie.

Thinking about this some more, admins on occasion cite several reasons for a deletion or other action, so we may want to allow them to specify the tags to apply manually ; we can't rely solely on the drop down menu (esp. when no option is selected). I think the easiest way to go about it is to get the tags from the reason input. We may require them to be enclosed as a comma separated list, say between /# and #/. Example of an admin selecting a drop down option "G2" and adding a custom comment :

[[WP:G2|G2]]: Test page/# CSD:G2 #/: goto [[WP:SANDBOX]] for testing

anything enclosed between /# and #/ gets removed before it is passed as a reason for the action, so we get this :

[[WP:G2|G2]]: Test page: goto [[WP:SANDBOX]] for testing

and the tag CSD:G2 is appended, provided it has been appropriately defined at Special:Tags. Things like this would work too :

test and/or vandalism /# CSD:G1, CSD:G2 #/
non notable /# CSD:A1

This also fixes the issue of manually inserted wpReasons that I mentioned at the end of my first comment.

Cenarium renamed this task from Allow tagging of actions based on drop down menu selection to Allow tagging of actions from reason parameter.Feb 6 2015, 8:10 AM
Aklapper triaged this task as Lowest priority.Feb 6 2015, 1:04 PM

I'm not sure I really care for more magic syntax in the "reason"/"summary" fields.

Then we need to go back to the implementation suggested in my first comment and add an input field for tags in the deletion/action interface, below the reason field. Is magic syntax OK in the dropdown mediawiki message ?
If it is, we can extract from it the tags to apply, in addition to any tag(s) specified in the tags field (excluding duplicates). Then the delete action should handle the tags parameter and perform tagging.
This is more elegant and solves the link issue since we can pre-fill the tags param.

Cenarium renamed this task from Allow tagging of actions from reason parameter to Allow tagging of actions from drop down menus.Feb 8 2015, 3:48 AM
Cenarium renamed this task from Allow tagging of actions from drop down menus to Allow tagging of admin actions from existing dropdown menus.Feb 9 2015, 7:10 PM
Cenarium renamed this task from Allow tagging of admin actions from existing dropdown menus to Allow tagging of admin actions.Sep 15 2015, 5:41 PM
Cenarium renamed this task from Allow tagging of admin actions to Allow manual tagging of admin actions.

As long as it's possible to manually tag admin actions, it should be possible to tag them according to the drop down menu selection with some javascript.
So this is the equivalent of T20670 (manual tagging of edits) for admin actions, and T111948 is the equivalent for rollback.
It would also make it possible to tag admin actions using external tools.