Page MenuHomePhabricator

Check constraints on Forms and Senses when loading Lexeme entity page
Closed, ResolvedPublic8 Estimated Story Points

Description

As an editor I want to see constraints violations on Form and Sense statements in order to see mistakes in the data and fix them.

Problem:
Right now statements on the Form and Sense level are not checked for constraints violations.

Example:
https://www.wikidata.org/wiki/Lexeme:L123 has two "compound of" statements at the moment. The one on the Lexeme level shows a constraint violation because of a missing mandatory qualifier. The one on the Form level doesn't.

Screenshots/mockups:

Screenshot_20180807_104613.png (911×1 px, 58 KB)

BDD
GIVEN a statement on a Form or Sense
AND that statement violates a constraint
WHEN loading the Lexeme page
THEN the violation should be checked and indicated via the little constraint violation icon

Acceptance criteria:

  • statements on Forms and Senses are checked for constraint violations and indicate them to the user in the same way as constraint violations on Item or Lexeme-level statements
  • given a lexeme with >50 forms + senses, it should still check all of them (make multiple requests to work around the 50 entity id limit on the API)

Open questions:
* Should action=wbcheckconstraints&id=L1 automatically check constraints on L1’s forms and senses, or should the gadget add the IDs of all the forms and senses to the API request? See below

Technical Notes
wbcheckconstraints should stay as it is. Since it can handle multiple entity ids in one request, Form and Sense ids need to be added to the API request on the client side. (Note that only up to 50 entities may be checked per request, so the client may have to split up requests for lexemes with more forms or senses.)

Event Timeline

Vvjjkkii renamed this task from Check constraints on forms and senses when loading lexeme entity page to n3baaaaaaa.Jul 1 2018, 1:07 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from n3baaaaaaa to Check constraints on forms and senses when loading lexeme entity page.Jul 2 2018, 3:28 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
Lydia_Pintscher renamed this task from Check constraints on forms and senses when loading lexeme entity page to Check constraints on Forms and Senses when loading Lexeme entity page.Aug 7 2018, 8:56 AM
Lydia_Pintscher updated the task description. (Show Details)
WMDE-leszek set the point value for this task to 8.Aug 7 2018, 12:20 PM

https://github.com/wikimedia/mediawiki-extensions-WikibaseQualityConstraints/blob/master/modules/gadget.js#L385 seems to be where it's at.

Change 460055 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] jasmine tests: add first steps

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

Change 460060 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] lexeme: serialize subentity ids

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

Change 460063 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: check entity and subentities

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

Change 460524 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: encapsulate in a module

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

Change 460557 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: separate functionalities

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

Change 460872 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: abilities as methods

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

Change 460920 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: test fullCheck in isolation

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

Change 461929 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] npm: add package-lock.json

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

Change 461929 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] npm: add package-lock.json

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

Change 460055 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] jasmine tests: add first steps

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

Change 460524 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: encapsulate in a module

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

Change 460557 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: fullCheck based on params

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

Change 463252 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] lexeme js model: make senses a property

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

Change 463252 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] lexeme js model: make senses a property

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

Change 463298 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] entity init: make available individually

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

Change 460872 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: abilities as methods

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

Change 460920 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: test fullCheck in isolation

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

Change 463298 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] EntityInitializer: make available individually

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

Change 460060 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] lexeme: allow access to subentity ids

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

Change 460063 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] gadget: check entity and subentities

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