Page MenuHomePhabricator

Avoid suggesting constraint types incompatible with the Property type
Open, Needs TriagePublic

Description

According to the 2020 report on Property constraints (T244043):

Most constraint types do not apply to most Property types. However, when editing the statements, all the constraint types are suggested by the web user interface for all the Property types. As there are a considerable number of different constraint types, this opens the door to confusion between the names of different constraint types and makes some of the applicable constraint types less visible. If a user defines a constraint that cannot be applied to the constrained Property because of an incompatible Property type, the software system allows the constraint to be saved and the problem is not reported.

Event Timeline

Do we know how much of an issue this currently is - as in how many nonsensical constraints there are?

The box "Data: Number of constraints by constraint type and Property type" in the report can work as an approximation. Blank cells are cases that most likely don't make sense. It will probably be necessary to code a similar matrix in WikibaseQualityConstraints. If this is done, it will be very useful to show that information in T244044.