Wikidata:Property proposal/constraint scope
constraint scope edit
Originally proposed at Wikidata:Property proposal/Property metadata
Description | defines the scope where a constraint is checked – on the main value of a statement, on qualifiers, and/or on references |
---|---|
Data type | Item |
Domain | Wikidata property (Q18616576) |
Allowed values | “main value”, “qualifier”, “reference” (there are items for the first two – Wikibase value (Q19798642) and Wikidata qualifier (Q15720608) – but I’m not sure if it’s correct to use them, so perhaps it would be better to create three fresh values that are only used to define constraints) |
Example | start time (P580)property constraint (P2302)subject type constraint (Q21503250) |
Planned use | change the WikibaseQualityConstraints extension (which powers the checkConstraints gadget) to respect the scope when deciding which constraints to check where |
Robot and gadget jobs | KrBot could ignore constraints without “main value” scope |
See also | property constraint (P2302) |
- Motivation
The checkConstraints gadget checks some constraints on qualifiers and references; however, determining which constraints to check on qualifiers and references and which not to check is difficult, and I have now come to the conclusion that it’s not possible at all to make a satisfactory decision purely on the constraint type: for instance, some type constraints make sense in qualifiers (taxon author (P405) as a qualifier of taxon name (P225) should only be used on items of the class taxon (Q16521)), but others do not (the type constraint for time interval (Q186081) on start time (P580) makes sense when start time (P580) is used in a main statement, but not when it is used as a qualifier). Therefore, I propose the introduction of a constraint scope constraint parameter, which declares explicitly where a constraint should and shouldn’t be checked.
Note: Jura1 has observed that we might want other kinds of “scopes” as well – for instance, criterion used (P1013) is used on many properties, but the values that make sense vary depending on the main property. So we might want to call this property something more specific, perhaps “constraint scope type”, so that other parameters that define the scope in a different way can also be defined.
Some previous discussion on this can be found on Wikidata talk:WikiProject property constraints. Lucas Werkmeister (WMDE) (talk) 17:42, 12 December 2017 (UTC)
- Discussion
Notified participants of WikiProject property constraints
WikiProject Properties has more than 50 participants and couldn't be pinged. Please post on the WikiProject's talk page instead.
- Support, this is clearly needed if we want to roll out the gadget to everyone. Sjoerd de Bruin (talk) 17:55, 12 December 2017 (UTC)
- Support ChristianKl (✉) 18:15, 12 December 2017 (UTC)
- Support —MisterSynergy (talk) 18:27, 12 December 2017 (UTC)
- Support John Samuel 18:47, 12 December 2017 (UTC)
- Support PKM (talk) 19:45, 12 December 2017 (UTC)
- Support Sannita - not just another it.wiki sysop 20:56, 12 December 2017 (UTC)
- Support David (talk) 07:14, 13 December 2017 (UTC)
- Comment Note that someone not using the gadget does get what this is about. Thierry Caro (talk) 16:57, 13 December 2017 (UTC)
- Are there any comments on the two open questions? (Or comments on anything else, of course ☺) --Lucas Werkmeister (WMDE) (talk) 14:11, 18 December 2017 (UTC)
- Which values should be used? Wikibase value (Q19798642), Wikidata qualifier (Q15720608), and a new item for “reference”, or three new items specifically for constraint scopes?
- Should this be labeled just “constraint scope” or something more specific, like “constraint scope type”, to leave room for other kinds of constraint scopes to be added in the future?
- I recommend using three new items. Regarding label, I'm not sure adding "type" really adds any more specificity here. --Yair rand (talk) 19:55, 19 December 2017 (UTC)
- Three new items is fine with me, and the label as is seems ok too; if we need to change it later due to confusion with another property, that can be done when needed. ArthurPSmith (talk) 16:44, 20 December 2017 (UTC)
- @Lucas Werkmeister (WMDE), Sjoerddebruin, ChristianKl, MisterSynergy, Jsamwrites: @PKM, Sannita, ديفيد عادل وهبة خليل 2, Thierry Caro, Yair rand: Done ArthurPSmith (talk) 20:48, 21 December 2017 (UTC)