Help:Property constraints portal/Item

From Wikidata
Jump to navigation Jump to search
Translate this page;
Other languages:
Deutsch • ‎English • ‎français • ‎polski • ‎русский • ‎српски / srpski • ‎العربية

This page contains changes. Please contact a translation admin to mark them for translation.


Other languages:
Deutsch • ‎English • ‎français • ‎polski • ‎русский • ‎српски / srpski • ‎العربية
Pictogram voting cluster.svg

item requires statement constraint (Q21503247) specifies that items using this property should have a certain other statement. The equivalent constraint for the value of a statement is value requires claim.

For example, items that have a killed by (P157) statement should also have statements for place of death (P20) and date of death (P570), as well as the statement manner of death (P1196)  homicide (Q149086).

If no constraint scope (P4680) is specified, this constraint is only checked on the main value of a statement. This is also the only currently supported scope.

Possible actions[edit]

There are several possible ways to address a violation of this constraint:

  • The most likely case is that the missing statements should be added to the item.
  • It’s possible that the current item should not have the statement at all, and that the statement should be removed.
  • It’s possible that the item is a rare, but legitimate exception to the constraint, and nothing should be done.

Parameters[edit]

This constraint has one mandatory and one optional parameter:

property (P2306)
Contains the property of the missing statement. Must contain exactly one property (no value Help or unknown value Help is not permitted). To add multiple required statements, add multiple constraints of this type.
item of property constraint (P2305)
Optional; contains the allowed values. no value Help and unknown value Help are interpreted literally, like any normal value (statements with no value Help or unknown value Help are only allowed if these special values are also given in the allowed values).
If this parameter is missing, the constraint only requires that a statement with the given property exists, but places no restriction on the value of that statement.

Examples[edit]

Example 1[edit]

Example setting for killed by (P157).

property constraint
Normal rank item requires statement constraint Arbcom ru editing.svg edit
property place of death
▼ 0 reference
+ add reference
Normal rank item requires statement constraint Arbcom ru editing.svg edit
property date of death
▼ 0 reference
+ add reference
Normal rank item requires statement constraint Arbcom ru editing.svg edit
property manner of death
item of property constraint homicide
▼ 0 reference
+ add reference
+ add value

Example 2[edit]

Example setting for Quebec cultural heritage directory ID (P633) which is identifier for the cultural heritage of Quebec. So if certain item has this identifier, the item should be in Canada.

property constraint
Normal rank item requires statement constraint Arbcom ru editing.svg edit
property country
item of property constraint Canada
constraint status mandatory constraint
▼ 0 reference
+ add reference
+ add value

Automatic violations fix[edit]

KrBot automatically fixes this constraint violations in the following case:

Template[edit]

When the constraint is set to the property, the following template is automatically displayed in the property talk page. The template is created by Module:Constraints using Template:Constraint, invoked from Template:Property documentation. Translations are defined at Module:i18n/constraints.

Item “coordinate location (P625): Items with this property should also have “coordinate location (P625)”. (Help)
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P635#Item P625, SPARQL, SPARQL (new)

Lists[edit]

Lists of properties which are set item requires statement constraint.