Page MenuHomePhabricator

Wikibase API should support adding change tags
Open, Needs TriagePublic

Description

This basically involves adding support for tags parameter. It would be useful for gadgets and user scripts (see request).

See also T97720: Add a tags parameter to API modules creating a logentry.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 11 2017, 6:41 PM
putnik added a subscriber: putnik.Jan 13 2017, 8:10 AM

I am glad that someone else shares the idea that it should be possible to set tags manually.

Here is a list of API actions which need to be able to set tags:

  • action=wbcreateclaim
  • action=wbcreateredirect
  • action=wbeditentity
  • action=wblinktitles
  • action=wbmergeitems
  • action=wbremoveclaims
  • action=wbremovequalifiers
  • action=wbremovereferences
  • action=wbsetaliases
  • action=wbsetclaim
  • action=wbsetclaimvalue
  • action=wbsetdescription
  • action=wbsetlabel
  • action=wbsetqualifier
  • action=wbsetreference
  • action=wbsetsitelink

Makes sense to me.
Do other modules outside Wikibase already allow it?

See the linked task.

@darthmon_wmde I’ve already started working on this (as part of Wikidata Bridge task T227003), so I’m not sure it makes much sense to unassign me…

To clarify: for Wikidata Bridge we likely only need support in wbeditentity, but the most reasonable implementation (as far as I can tell) ends up adding support to almost all other modules as well. The exception are modules that create a redirect rather than a regular entity edit – I’ll leave those aside for now. (Also, I’m not implementing this for modules outside of Wikibase, i. e. WikibaseLexeme.)

Change 528221 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Add $tags parameter to {Form,Sense}Store::saveEntity()

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

Change 528222 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Add $tags parameter to EntityStore, EditEntity

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

Change 528223 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Add tags parameter to editing API modules

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

Actually, let’s split this task up after all. Disregard the gerritbot comments, I’ll move those patches to one of the subtasks.