Page MenuHomePhabricator

Suggested statements (without values) in UploadWizard configurable via json
Closed, ResolvedPublic


Campaigns are configurable via json like this

ATM the wikibase properties that are shown by default on the File page and in UploadWizard (currently just 'depicts') are defined in MediaInfoProperties in extension.json (accessible inside the php code as the global $wgMediaInfoProperties)

The simplest way to implement this (or, at least, I hope it'll be simple :) ) would be to also allow this to be also defined in the campaign config, and merged (with the campaign config taking priority).

Acceptance criteria:

  • can enter property ids into campaign json config, and have a section with the property id set appear in UW so the user can add their own value

Event Timeline

Change 530107 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/UploadWizard@master] Suggested statements for campaigns

Here's an example campaign set up to have P276 (wiidata property 'location') set up as a suggested statement on the metadata page of UW:

    "enabled": true,
    "wikibase": {
        "enabled": true,
        "statements": true
    "defaults": {
        "statements": [
                "propertyId": "P276",
                "dataType": "wikibase-entityid"

Change 530107 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Suggested statements for campaigns

Ramsey-WMF added a subscriber: Ramsey-WMF.

Tested this on Beta and it seems to be working.

  • Tested entering the same property twice in the config code and it only showed up once in the UI. Good!
  • Tried changing the dataType to something other than "wikibase-entityid" and it didn't show that property. Good! [side note though, do we need dataType?]
  • Tested using up to 5 properties in various sequences and it worked fine.

Note: If the user adds a P number that doesn't exist on Wikidata, it still shows up in the UI. I think this is okay for now though.