Property talk:P2630

From Wikidata
Jump to navigation Jump to search

Documentation

cost of damage
monetary value of damage caused by this event
[create Create a translatable help page (preferably in English) for this property to be included here]
Range from “0” to “1e+15”: values should be in the range from “0” to “1e+15”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2630#Range
Dimensionless quantity: value shall not include any units. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2630#Units, SPARQL
Citation needed: the property must have at least one reference (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P2630#citation needed
Use a currency as a unit
cost of dammage who don't use a curency as a unit. (Help)
Violations query: SELECT ?item ?currency WHERE { ?item p:P2630/ps:P2630/wikibase:quantityUnit ?currency . FILTER NOT EXISTS { ?currency wdt:P31/wdt:P279* wd:Q8142 } }
List of this constraint violations: [[Wikidata:Database reports/Complex constraint violations/P2630#Use a currency as a unit|Database reports/Complex constraint violations/P2630#Use a currency as a unit]]

Unit constraint[edit]

@Pigsonthewing: I put the Unit constraint because mostly a damage cost is in a currency (Q8142). I put United States dollar (Q4917) and Euro (Q4916) by deffault, but a user should be free to add more currency (Q8142). --Fralambert (talk) 22:55, 20 March 2016 (UTC)[reply]

We don't need a list of every currency here. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:13, 21 March 2016 (UTC)[reply]
Is there a way to specify that the units must be an instance or subclass of currency? Thryduulf (talk: local | en.wp | en.wikt) 14:52, 21 March 2016 (UTC)[reply]
Il imagine we can use {{Complex constraint}}, but I am unfamiliar with sparql. I will ask someone who have some knowledge of the language.--Fralambert (talk) 21:52, 21 March 2016 (UTC)[reply]
@Pigsonthewing, Thryduulf: Thanks to Ash Crow, I added a Complex constraint for curencies. We can also copy it to price (P2284) and cost (P2130) with some minor modifications in the query. --Fralambert (talk) 23:33, 21 March 2016 (UTC)[reply]
@Fralambert: in that case, can we remove the constraint that lists specific limited currencies? It still gives an error if ones not on that list are used, even if the fulfill the complex constraint. Arlo Barnes (talk) 23:22, 13 December 2019 (UTC)[reply]
@Arlo Barnes: It was Jura1 who readded the list of currency. Maybe he have some explication? Personally the complex contraint work just fine. You delete the constraint. --Fralambert (talk) 13:40, 14 December 2019 (UTC)[reply]