|Resolved||daniel||T121395 [Bug] Term constraints not working|
|Resolved||daniel||T125516 [Task] Investigation: Find solutions for broken term contraints checking|
Problem: when validating an edit, we apply the modification to the base revision of the entity, and the check for conflicts. However, the modification is eventually applied to the current revision of the entity (via the diff-and-patch mechanism in EditEntity).
Quick solution suggested by Jan: for validation, apply the modification to the current revision of the entity, and check for conflicts. Then, apply it to the base revision, and go through the diff-and-patch mechanism in EditEntity.
Better solution avoiding diff-and-patch: before validation, have the ChangeOp check for a conflict by looking at both, the base and current revisions of the entity. IF there is no conflict, apply the modification to the current revision, check for conflicts, and save without any diff-and-patch. See T126231: [RFC] Detect edit conflicts in ChangeOp instead of using diff-and-patch in EditEntity.