Dominicbm created this task.
Dominicbm added projects: MediaWiki-extensions-WikibaseClient, Wikidata, 
StructuredDataOnCommons.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  Neither `#statements` nor `#property` seem to have a method for fetching of a 
Wikidata item ID in the case that the value requested is a wikibase-item data 
type. We are stuck retrieving either a formatted item label or a plain text 
label, even though the item is clearly already being accessed on the backend to 
retrieve the label, so the item ID must also be being accessed. This is less 
than useful for template coding, because:
  
  1. Wikidata labels can change and are not unique. So you can't build template 
logic around having different behaviors for specific values returned by the 
parser functions, whereas a Q-id should (in theory) be predictable.
  2. With existing Lua-based templates, there are many use cases where users on 
other wikis can plug in Wikidata item IDs in order to generate important page 
content, such as Wikipedia infoboxes or Commons creator and institution 
templates.
  
  An example use case for the scenario in #2, I would like to store the 
institution data in a Commons file's `P195` statement. If I can retrieve the 
item ID, I can use it to populate the institution template, like 
`{{institution| {{#itemvalueid:P195|from=M123}} }}`. (No opinion on what to 
call the function.) With `#property`, I currently can only have the item's 
plain text label, which doesn't allow me to get the full use out of templates 
like these.
  
  Also, this would allow us to build more useful templates without the need of 
Lua infrastructure. Using the above example, if I can get the item ID for a 
Commons file's `P195` statement value, then I can use other functions, such as 
`#statements` to query //that// Wikidata item for other data, such as the 
institution's associated Commons category, logo, location, etc.
  
  Related to T141864 <https://phabricator.wikimedia.org/T141864>, which also 
seems to be about the utility of retrieving item IDs for downstream use.

TASK DETAIL
  https://phabricator.wikimedia.org/T296549

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dominicbm
Cc: Aklapper, Dominicbm, Invadibot, maantietaja, FRomeo_WMF, CBogen, 
Nintendofan885, Akuckartz, Nandana, JKSTNK, lucamauri, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to