Page MenuHomePhabricator

Block merging of Lexemes that should not be merged
Closed, ResolvedPublic3 Estimated Story Points

Description

As an editor I want to have the merging of certain Lexemes blocked in order to avoid mistake merges that take unnecessary time to revert and untangle.

Screenshots:
Error when trying to merge two items with different descriptions for the same language:

Screenshot_20180625_160638.png (853×1 px, 70 KB)

BDD
GIVEN I want to merge two Lexemes
AND they link to each other in any statement (doesn't matter if on the Lexeme, Form or Sense level)
THEN the merge is not done
AND I get an error message saying "Failed to merge Lexemes, please resolve any conflicts first. Error: Lexemes link to each other in a statement."

GIVEN I want to merge two Lexemes
AND they have different Lemmas in the same spelling variant
THEN the merge is not done
AND I get an error message saying "Failed to merge Lexemes, please resolve any conflicts first. Error: Lexemes have different Lemmas for the same spelling variant."

GIVEN I want to merge two Lexemes
AND they have different language and/or lexical category
THEN the merge is not done
AND I get an error message saying "Failed to merge Lexemes, please resolve any conflicts first. Error: Lexemes have different language and/or lexical category."

GIVEN I want to merge two Lexemes
AND I enter the same Lexeme id twice
THEN the merge is not done
AND I get an error message saying "Failed to merge Lexemes. Error: The provided Lexeme IDs are identical."

Acceptance criteria:

  • All of the above cases result in an aborted merge.
    • the merge fails on the first problem, showing the respective message

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 446814 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] lexeme merging: implement ChangeOps

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

Change 448026 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] ChangeOpsMerge: abstract cross-referencing validation

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

Change 448027 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] NoCrossReferencingStatements: check for all snaks

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

Change 448026 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] ChangeOpsMerge: abstract cross-referencing validation

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

Change 448027 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] NoCrossReferencingStatements: check for all snaks

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

Change 450574 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] DifferentEntities: add validator

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

Change 450574 abandoned by Pablo Grass (WMDE):
DifferentEntities: add validator

Reason:
EntityId::equals() should do

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

Change 446814 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] lexeme merging: implement ChangeOps

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

Change 458200 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] Introduce and use NoCrossReferencingLexemeSnaks

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

Change 458200 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Introduce and use NoCrossReferencingLexemeStatements

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