Add a tags parameter to API modules creating a logentry
Open, LowPublic

Description

Please add a tags parameter to API modules that create a logentry, allowing a user with applychangetags right to tag his action and the corresponding logentry, just like action=edit module has now.

Relevant modules in core:

  • action=block
  • action=createaccount
  • action=delete
  • action=imagerotate
  • action=import
  • action=managetags
  • action=move
  • action=patrol
  • action=protect
  • action=revisiondelete
  • action=tag (tagception...)
  • action=unblock
  • action=undelete
  • action=upload
  • action=userrights

Modules in extensions (some of these look internal, so maybe not relevant):

  • action=cxdelete
  • action=flow (and its submit submodules)
  • action=flowthank
  • action=globalblock
  • action=globaluserrights
  • action=massmessage
  • action=thank
  • action=visualeditoredit

And perhaps some other modules from other extensions used on wikimedia wikis

Dr_Brains updated the task description. (Show Details)
Dr_Brains raised the priority of this task from to Normal.
Dr_Brains added a subscriber: Dr_Brains.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 30 2015, 10:00 PM
Dr_Brains updated the task description. (Show Details)May 1 2015, 1:07 PM
Dr_Brains set Security to None.
Ltrlg added a subscriber: Ltrlg.May 1 2015, 2:36 PM
Anomie added a subscriber: Anomie.

In general a good idea. Open question is whether core "business logic" should handle this like was done for action=edit, or if the API should offer this feature without it being available to the web UI.

Anomie lowered the priority of this task from Normal to Low.May 1 2015, 4:17 PM
Dr_Brains renamed this task from Add a tag parameter to API modules creating a logentry to Add a tags parameter to API modules creating a logentry.May 1 2015, 10:07 PM
TTO updated the task description. (Show Details)Oct 15 2015, 2:08 AM

I removed action=imagerotate as it doesn't appear to create log entries.

Anomie updated the task description. (Show Details)Oct 15 2015, 5:24 PM

The call to $file->upload() creates the log entry. Although see T35186: Provide a well-performing API to rotate an image, the whole module needs work so it can be undisabled on WMF wikis.

Based on how many API modules need support for this, I think we need some kind of common/shared code to help out:

  • API should have a PARAM_TYPE => 'tag' or something which automatically validates that the tag exists and can be used
  • ManualLogEntry should have a ->setTag() method (or something). So API code would just need to pass $params['tag'] directly to it.
TTO updated the task description. (Show Details)Nov 17 2015, 9:58 AM

Rollback doesn't create log entries.

I think Legoktm is onto something here...

Change 265230 had a related patch set uploaded (by Victorbarbu):
Add logic for "tags" in ApiBase

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

Change 266181 had a related patch set uploaded (by Unicornisaurous):
Add parameter to API modules to apply change tags to log entries

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

Change 266185 had a related patch set uploaded (by Sn1per):
Add tags support to ApiProtect

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

MtDu added a subscriber: MtDu.Jan 26 2016, 4:35 AM

I am interested in learning how to do this. I will look into action=createaccount. I will definitely ask for guidance on IRC. :)
Thanks,
MtDu

Anomie updated the task description. (Show Details)Jan 26 2016, 4:10 PM

I am interested in learning how to do this. I will look into action=createaccount.

Since action=createaccount is probably being completely rewritten for T110276: Rewrite the login API to use AuthManager, you might want to choose a different action to look into.

Change 265230 merged by jenkins-bot:
Add logic for "tags" in ApiBase

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

Change 266185 merged by jenkins-bot:
Add tags support to patrol, protect, unblock, and undelete

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

Sn1per updated the task description. (Show Details)Mar 3 2016, 7:22 PM
Restricted Application added a subscriber: Luke081515. · View Herald TranscriptMar 4 2016, 5:50 PM
TTO updated the task description. (Show Details)Dec 29 2016, 3:52 AM

Change 329653 had a related patch set uploaded (by MtDu):
Add tags support to the following API modules

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

MtDu updated the task description. (Show Details)Dec 30 2016, 2:23 PM

Change 330116 had a related patch set uploaded (by Georggi199):
Add tags support to userrights

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

Change 330116 merged by jenkins-bot:
Add tags support to userrights

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

Change 330133 had a related patch set uploaded (by Georggi199):
Add tags support to FlaggedRevs extension

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

TTO updated the task description. (Show Details)Jan 4 2017, 9:30 AM

Change 329653 merged by jenkins-bot:
Add tagging support to imagerotate, revisiondelete, and tag API modules

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

Change 331134 had a related patch set uploaded (by Georggi199):
Add change tagging support to ApiStabilize

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

Change 266181 merged by jenkins-bot:
Add parameter to API modules to apply change tags to log entries

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

Anomie updated the task description. (Show Details)Jan 13 2017, 5:44 PM
Anomie moved this task from Needs details or plan to Non-core-API stuff on the MediaWiki-API board.