Topic on User talk:Lucas Werkmeister (WMDE)

Jump to navigation Jump to search
Summary by Lucas Werkmeister (WMDE)

new constraint types (no bounds, single best value) and {{Constraint}}

MisterSynergy (talkcontribs)
Lucas Werkmeister (WMDE) (talkcontribs)
MisterSynergy (talkcontribs)

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.

Lucas Werkmeister (WMDE) (talkcontribs)

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.

MisterSynergy (talkcontribs)
Matěj Suchánek (talkcontribs)
MisterSynergy (talkcontribs)

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).

Matěj Suchánek (talkcontribs)

Of course, done.