Page MenuHomePhabricator

Enable page wikidata item reference/Z825K1 replacement to work with both Wikidata item and Wikidata reference seamlessly
Closed, ResolvedPublic

Description

Description

The Abstract Wiki content page has a related Wikidata item id, which can be passed as an argument to the fragment function calls.

The type of this argument is Wikidata Item Reference/Z6091, which means that:

  • If used directly for a Wikidata Item/Z6001, it will fail
  • To use it as Wikidata item, one must expand the Wikidata item, and use the page argument in the child "Wikidata item reference" key (as shown below)

Screenshot from 2026-02-11 12-55-45.png (378×360 px, 20 KB)

This adds complexity that should be invisible to the user

Desired behavior/Acceptance criteria

  • (maybe needed) restrict selection of argument references by expected type
  • When using a function that takes Wikidata item or Wikidata item reference, allow selection of argument reference "wikidata item reference"
  • When selecting "wikidata item reference" for a Wikidata item/Z6001, create the correct fetch representation: Z6821( Z18( Z825K1 ) )
  • When selecting "wikidata item reference" for a Wikidata item reference/Z6091, use argument reference directly: Z18( Z825K1 )

Completion checklist

Event Timeline

gengh renamed this task from Enable Z825K1 replacement to work with both Wikidata item and Wikidata reference seamlessly to Enable page wikidata item reference/Z825K1 replacement to work with both Wikidata item and Wikidata reference seamlessly.
gengh added a project: OKR-Work.
gengh updated the task description. (Show Details)

Change #1240083 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Transform wikidata reference argument when picked for wikidata item key

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

Jdforrester-WMF changed the task status from Open to In Progress.Feb 18 2026, 4:07 PM
Jdforrester-WMF triaged this task as Medium priority.

Change #1240083 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Transform wikidata reference argument when picked for wikidata item key

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