Thanks for single best value constraint (Q52060874), I will soon have a look at it. Right now I try to add docs for no bounds constraint (Q51723761) …
Do you happen to know whether we still need the templates at Template:Constraint?
new constraint types (no bounds, single best value) and {{Constraint}}
Thanks for single best value constraint (Q52060874), I will soon have a look at it. Right now I try to add docs for no bounds constraint (Q51723761) …
Do you happen to know whether we still need the templates at Template:Constraint?
Thanks for the “no bounds” documentation! I’ve started a page for “single best value”, Help:Property constraints portal/Single best value.
I’m not sure what to do about {{Constraint}}
to be honest…
Okay. Some items such as type constraint (Q21503250) link to those templates with topic's main template (P1424), but as we don’t have templates for all constraint types, I am not sure whether the existing ones are still in use.
On Property talk:P1083 for instance you can find a constraint box for the no bounds constraint (Q51723761) of that property. No idea where it stems from. I still look for the location where I can add a SPARQL query with live constraint violations for this type, as the box does not contain one.
Another issue to consider is that User:KrBot2 does not yet understand the new constraints, cf. Wikidata:Database reports/Constraint violations/P1086. I already went to Ivan’s talk page to report this problem.
I think {{Property documentation}}
automatically adds constraint boxes for the constraints defined in the property’s constraint statements, using those templates (via Module:Constraints). But I’m not an expert on that area at all, I’m not sure how it works.
Looks like Module:Constraints/SPARQL is relevant for the SPARQL query, and @Matěj Suchánek is the one to ask (hereby done). He probably also knows whether the templates are still in use…
{{Constraint}}
is indeed still used by Module:Constraints, which uses Module:Constraints/SPARQL to append SPARQL queries.
Good to know. Can you help and add a SPARQL query for the new no bounds constraint (Q51723761)? Something like SELECT ?item ?value ?lower ?upper ?diff WHERE { ?item p:P1083 [ psv:P1083 [ wikibase:quantityAmount ?value; wikibase:quantityLowerBound ?lower; wikibase:quantityUpperBound ?upper ] ] . BIND( (?upper - ?lower)/2 AS ?diff ) }
should do the job (here with P1083 as an example).