Page MenuHomePhabricator

Don’t make “difference within range” constraint imply “item requires claim” constraint?
Closed, ResolvedPublic

Description

DiffWithinRangeChecker currently “implies” two other constraints: “single value”, in that it just uses the first occurrence of the other property and stops there (though no error is reported if there’s more than one value for the other property); and “item requires claim”, in that an error is reported if no value for the other property is found. On [Wikidata talk:WikiProject property constraints](https://www.wikidata.org/wiki/Wikidata_talk:WikiProject_property_constraints#difference_within_range_constraint_(Q21510854%29), @Esc3300 suggested that the second case shouldn’t happen, since the constraint reports by KrBot don’t report an error in this case.

I’m inclined to agree, since you can also explicitly put an “item requires claim” constraint on the property if that’s what you wanted… except that we now support “difference within range” on qualifiers and references (T175565), but not yet “item requires claim” (T175562). So there are cases where we don’t yet let you specify this constraint explicitly. Is that a problem?

Event Timeline

Is that a problem?

It’s an acceptable trade-off – we fix a lot of false positives (constraint violations we reported that we shouldn’t), at the cost of some false negatives (sometimes the previously implied constraint can’t be specified explicitly).

Change 424590 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Make “diff within range” accept missing statement

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

Change 424590 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Make “diff within range” accept missing statement

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