Description
In the initial implementation of orchestrator code to import qualifiers and references, we decided to omit Z6003K5 or Z6003K6 if there were no qualifiers or references, respectively. This was solely motivated by the desire to produce more compact ZObjects (for imported Wikidata entities), and thus reduce (somewhat) the amount of processing the orchestrator does over such objects. (There can be many statements inside a Wikidata entity, and many of them may have no qualifiers and/or references. The normal form representation of an empty list of ZObjects is a bit bulky, so we wanted to omit those empty lists.)
This turned out to be a mistake. When an imported statement has a missing Z6003K5 or Z6003K6, it cannot be compared to a statement constructed in the UI, where those keys will always appear (Without making an unnecessarily complex comparison function). So we need to reverse that decision.
Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)
- Every statement in an imported Wikidata entity should have a value for Z6003K5 and Z6003K6. When there are no qualifiers or references, the value should be an empty Typed List with the appropriate type.
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Back-end_Task/Bug_completion_checklist