Page MenuHomePhabricator

Implement property scope constraint
Closed, ResolvedPublic

Description

property scope is a new constraint type specifying where a property may be used: in the main snak, in qualifiers, and/or in references. There has been some controversy about the way this constraint is modeled, but from the project talk page there now seems to be general agreement that the constraint parameter for this is the new property scope property.

Should be fairly easy to implement: add support for the parameter to ConstraintParameterParser (returning an array of Context::TYPE_* constants), and then in the new checker simply look at the context’s type.

In the interest of a healthy relationship with the community, I think we should implement this as soon as possible :) however, there will be no deployments on the week of June 18th (SRE offsite), so the next regular deployment where this could happen will be on the evening of June 27th (assuming no train problems). I’ll try to implement this on June 25th and 26th, and hopefully get it merged before the branch cut.

Patch-For-Review:

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseQualityConstraints : masterSimplify parseConstraintScopeParameter()
mediawiki/extensions/WikibaseQualityConstraints : masterMerge (de)serialization of constraint/property scopes
mediawiki/extensions/WikibaseQualityConstraints : masterAdd support for property scope message arguments
mediawiki/extensions/WikibaseQualityConstraints : masterAdd “property scope” constraint type
mediawiki/extensions/WikibaseQualityConstraints : masterAdd support for parsing property scope parameter
mediawiki/extensions/WikibaseQualityConstraints : masterRename constraint scope parameter test helper

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 15 2018, 3:07 PM
Lucas_Werkmeister_WMDE triaged this task as High priority.Jun 15 2018, 3:08 PM
Ghuron added a subscriber: Ghuron.

Change 440879 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Rename constraint scope parameter test helper

https://gerrit.wikimedia.org/r/440879

Change 440880 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add support for parsing property scope parameter

https://gerrit.wikimedia.org/r/440880

Hm, there is one extra requirement – we need to add support for property scope arguments to ViolationMessage.

Change 441029 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add support for property scope message arguments

https://gerrit.wikimedia.org/r/441029

Change 441030 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add “property scope” constraint type

https://gerrit.wikimedia.org/r/441030

Change 440879 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Rename constraint scope parameter test helper

https://gerrit.wikimedia.org/r/440879

Jonas updated the task description. (Show Details)Jun 21 2018, 9:38 AM
Ghuron removed a subscriber: Ghuron.Jun 21 2018, 8:37 PM
Jonas updated the task description. (Show Details)Jun 22 2018, 8:00 AM

Change 441835 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Merge (de)serialization of constraint/property scopes

https://gerrit.wikimedia.org/r/441835

Change 441847 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Simplify parseConstraintScopeParameter()

https://gerrit.wikimedia.org/r/441847

Change 440880 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add support for parsing property scope parameter

https://gerrit.wikimedia.org/r/440880

Change 441029 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add support for property scope message arguments

https://gerrit.wikimedia.org/r/441029

Change 441030 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add “property scope” constraint type

https://gerrit.wikimedia.org/r/441030

Change 441835 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Merge (de)serialization of constraint/property scopes

https://gerrit.wikimedia.org/r/441835

Change 441847 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Simplify parseConstraintScopeParameter()

https://gerrit.wikimedia.org/r/441847

Ladsgroup moved this task from incoming to in progress on the Wikidata board.Jun 28 2018, 3:14 PM
Lydia_Pintscher closed this task as Resolved.Jul 2 2018, 9:10 AM
Lydia_Pintscher moved this task from Test (Verification) to Done on the Wikidata-Campsite board.
Lydia_Pintscher added a subscriber: Lydia_Pintscher.

\o/