Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Use the real datatype for a selected property (in UW) instead of hardcoding wikibase-entityid
Closed, ResolvedPublic

Description

We have this:

The datavalue datatype is currently hardcoded to wikibase-entityid when adding new properties in UploadWizard.
We need that to be the actual datatype.
See: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/UploadWizard/+/513631/2/resources/metadata/uw.MetadataContent.js#50

We want this:

The search results show the datatype (e.g. wikibase-item), but we need to map that to the datavalue datatype (wikibase-entityid).
This is already done in MediaInfo, in PHP. Useless for UploadWizard, but it's a good place to go look for how it can be done.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It looks like mw.config.get( 'wbDataTypes' ) already holds this map!
wbDataTypes won't exist on Special:UploadWizard, but we should probably let WikibaseMediaInfo expose a similar (or the exact same) map, in the same way it already does wbmiProperties (and a few others) so that they're always available, even for UploadWizard.

Change 516521 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/WikibaseMediaInfo@master] Make sure the js variable wbDataTypes is available site-wide

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

Change 516522 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/UploadWizard@master] Use the wikibase wbDataTypes variable to map wikibase-item to wikibase-entityid

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

Change 516609 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/Wikibase@master] Add target to wbDataTypes config var

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

Change 516609 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add target to wbDataTypes config var

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

Change 517847 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Use the wikibase wbDataTypes variable to map wikibase-item to wikibase-entityid

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

Change 516521 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Make sure the js variable wbDataTypes is available site-wide

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

Change 516522 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Use the wikibase wbDataTypes variable to map wikibase-item to wikibase-entityid

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

Change 517847 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Use the wikibase wbDataTypes variable to map wikibase-item to wikibase-entityid

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