As an editor I want to restrict the entity type to which a constraint applies in order to avoid false constraint violations.
It is currently not possible to restrict the entity type (Item, Property, Lexeme, Form, Sense) to which a constraint should apply. This would be useful because a Property is sometimes used in different contexts in the different entity types.
https://www.wikidata.org/w/index.php?title=Property:P443&oldid=1316228429#P443$8116725c-4f59-8b08-31bc-99eeb5dd52df should be checked on Items but not on Lexemes
GIVEN a constraint definition
WHEN it includes a restriction on the entity type it applies to
THEN no constraint violations are triggered on the excluded entity types
- a separate configuration variable for the “constraint scope (entity)” property, but using the same default as the existing “scope” parameter (`P4680`)
- allowed values are the same as for the “allowed entity types” constraint
[ ] no constraint violations are triggered on entity types that are excluded by the constraint definition
[ ] warnings for invalid “scope” parameters include the newly allowed values (item, property, etc.) in the warning message (“X is not a valid value, must be one of…”)
[ ] the maintenance script to import constraint entities doesn’t break when two of the variables default to the same property
* Should we exclude certain entity types or include? So should we have a allow or deny list?
** -> listing the types where the constraint should be checked (which also matches how constraint scope works right now)
* What should this be called?
* Should we reuse the scope parameter?