Page MenuHomePhabricator

PropertyId is not formatted with label when saving / adding new statements
Closed, ResolvedPublic

Description

git bisect finds the API BREAKING CHANGE (https://gerrit.wikimedia.org/r/#/c/227686/) is when this broke.

Event Timeline

aude raised the priority of this task from to High.
aude updated the task description. (Show Details)
aude subscribed.

the serialization from wbgetentities is returned like:

{"entities":[{"pageid":122,"ns":122,"title":"Property:P31","lastrevid":122,"modified":"2015-08-03T22:06:39Z","type":"property","datatype":"wikibase-item","id":"P31","labels":[{"language":"en","value":"stated in"}],"descriptions":[{"language":"en","value":"to be used in the source field, to indicate where a claim is made"}],"aliases":{"en":[{"language":"en","value":"source of claim"}]},"claims":{}}],"success":1}

before, it was like:

{"entities":{"P31":{"pageid":122,"ns":122,"title":"Property:P31","lastrevid":122,"modified":"2015-08-03T22:06:39Z","type":"property","datatype":"wikibase-item","id":"P31","labels":{"en":{"language":"en","value":"stated in"}},"descriptions":{"en":{"language":"en","value":"to be used in the source field, to indicate where a claim is made"}},"aliases":{"en":[{"language":"en","value":"source of claim"}]}}},"success":1}

with "en" as a key for labels and other terms. The javascript code is expecting these.

Addshore awarded a token.
Addshore set Security to None.

Yep, this should now have happened, patching now.....

Change 234528 had a related patch set uploaded (by Addshore):
Fix keys for labels and descriptions in JSON API

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

Change 234528 merged by jenkins-bot:
Fix keys for labels, descriptions & sites in JSON API

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

aude removed a project: Patch-For-Review.