Page MenuHomePhabricator

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

Description

Campaigns are configurable via json like this

https://commons.wikimedia.org/w/index.php?title=Campaign:wlm-es&action=edit

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

Cparle created this task.May 22 2019, 4:50 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptAug 10 2019, 11:54 PM

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

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

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

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

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.

Ramsey-WMF closed this task as Resolved.Mon, Sep 9, 3:42 PM