Context:
Constraints System
User story:
As an editor, I want to define that all Items using a certain Property should have a Description in a specific language. This helps to ensure that all the mandatory Descriptions are added.
Problem:
We currently do have a constraint that helps ensure certain items always have a label in a specific language (see T195178), but we dont have that for descriptions.
Example:
- RKDartists ID (P650) "Identifier for artists in the database of the Netherlands Institute of Art History". Items using this Property should have a Dutch description.
BDD
GIVEN a Constraint definition that requires a Description in language X for Property Y
WHEN an Item uses Property Y
AND does not have a Description in Language X
THEN a constraint violation is triggered for the statement using Property Y
Notes:
- We also want this constraint to work on Property pages. We probably want to ignore it on MediaInfo and on Lexemes.
- If several languages are provided in the constraint then the constraint is satisfied if at least one of the languages has a label added.
- We are using "Wikimedia Language Code (P424)" as the qualifier.
- We are using a new item (“description in language constraint”) as the constraint type, not reusing the complex constraint label language item.
Acceptance criteria:
- constraint violations are triggered when an Item uses a Property with a Description language constraint but does not have a label in the specified language (see BDD including notes)
- the new constraint type is documented at Help:Property constraints portal (new subpage)