Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added projects: Wikidata, Wikibase-Quality, Wikibase-Quality-Constraints.
Herald added a subscriber: Aklapper.

TASK DESCRIPTION

Currently, we only check constraints on the statement main snak. We should also check them on qualifiers and on references.

Does this apply to all constraint types or just some of them? There are “value only”, “qualifier only” and “reference only” constraint types, which only make sense with this feature. Constraints like “range”, “value type”, or “one of” make sense on qualifiers and references. On the other hand, “item required claim” and “type” don’t really make sense there, I think. But it might not hurt to just allow them anyways, and if people add those constraints, so be it.


Implementation idea: checkConstraint could take a ConstraintContext argument instead of the current Statement and EntityDocument arguments; the context would expose the entity, the statement, the snak to be checked, and what kind of context it is (is the snak the main snak, a qualifier, or a reference?).

This might require a breaking change to the API output format.


TASK DETAIL
https://phabricator.wikimedia.org/T168532

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Aklapper, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to