Page MenuHomePhabricator

Serialized statements of Forms and Senses are missing data type fields
Closed, ResolvedPublic

Description

Serialized statements usually contain a datatype field in the serialization for both main snaks and qualifiers and references. This field is there for statements on the lexeme, but is missing on its sub entities.

- taken from https://www.wikidata.org/wiki/Special:EntityData/L171.json

Task inspection notes from 11 August 2020 T249206#6376019

Event Timeline

@Addshore pointed out that this is likely missing because of the way datatype is massaged onto the response in ResultBuilder

Ladsgroup added a subscriber: Ladsgroup.

Notes from the task inspection:

We don't think this needs to be broken down into tasks, and we will just work with this 1 ticket.

Questions:

  • Is this stored at all, or only about the display
    • Only about display
  • Does a stable interface policy apply here?
    • It counts as a "Significant change", we should announce that the change is coming @Lydia_Pintscher @Lea_Lacroix_WMDE
    • The policy says that typically / generally things like this are available on test 2 weeks before, this would increase the level of effort 2-5x? @Lydia_Pintscher is it okay if we do not do this? (OPEN QUESTION)

Tech pointers:

  • Reproducability WikibaseLexeme extension needed, and to create a Lexeme with a Sense and a Form, both of which have a statement. Then look at said Lexeme via the API (wbgetentities / special entity data)
  • extensions/Wikibase/lib/includes/Serialization/CallbackFactory.php getCallbackToAddDataTypeToSnaksGroupedByProperty
  • extensions/Wikibase/repo/includes/Api/ResultBuilder.php getArrayWithDataTypesInGroupedSnakListAtPath

Change 620097 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Count subentity claims as well in adding data type

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

Change 620098 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/WikibaseLexeme@master] Add tests for ResultBuilder for API for lexemes

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

Michael added a subscriber: Michael.

These changes need to be announced before they can be merged

We want to deploy this on the 26th and announce it next week. We will skip the 2 weeks test system period for this change because we do not believe it is worth the effort in this case.

Change 620097 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Count subentity claims as well in adding data type

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

Change 620098 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add tests for ResultBuilder for API for lexemes

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

I ran into this issue last year, when writing MachtSinn. Nice to see that this is actually a bug and not a design choice. Is this already deployed, so I can remove the hack I needed to circumvent this?