Page MenuHomePhabricator

Support properties with symmetric and inverse constraints
Closed, ResolvedPublic

Description

  • SymmetricChecker and InverseChecker use ConnectionCheckerHelper::findStatement.
  • ConnectionCheckerHelper::findStatement’s interface was designed for ItemChecker, TargetRequiredClaimChecker and ConflictsWithChecker, which need to support unknown value and no value, so they can’t just use EntityId objects directly.
  • ItemIdSnakValue encapsulates an ItemId, unknown value, or no value, but not other kinds of entity IDs, since “item requires claim”, “target requires claim” and “conflicts with” constraints only support items as the (un)expected values.
  • As an unintended consequence, SymmetricChecker and InverseChecker don’t work on properties, since the expected value in their case is the entity (ID) with the constraint.

This apparently causes lots of log errors, which are the subject of T170599: Wikibase: $idSerialization must match /^Q[1-9]\d{0,9}\z/i.

The best place to break this up is probably the first bullet point – split findStatement into findStatementWithEntityId and findStatementWithItemIdSnakValue.

Event Timeline

Change 365232 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Support properties with symmetric and inverse constraints

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

Jonas moved this task from Review to Done on the Wikidata-Former-Sprint-Board board.

Change 365232 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Support properties with symmetric and inverse constraints

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