As a Wikidata editor, I want property labels to be unique per language at all times, so that different properties don’t get confused for one another (and so that the {{#statements:propertyName}} parser function is unambiguous).
As a Wikibase developer, I want hard constraints to actually be enforced as strictly as they’re supposed to be.
Problem:
Currently, reverting an edit to a property label (or restoring a previous revision with a different label) is allowed, even if another property got the same label in the meantime, which means that after the revert/restore, two properties have the same label. This is not supposed to be possible (if you try to edit a property label so it’s the same as another property, you get an error).
Example:
- Create P1, label it A
- Create P2, label it A2
- Relabel P1 to A1
- Relabel P2 to A
- Revert edit to P1
Both P1 and P2 will have the label A.
Note that the other main hard constraint, sitelink uniqueness, is enforced on undo/restore:
BDD
GIVEN a property with label x in a language
AND another property with label y in the same language
WHEN I try to set the first property’s label to y, whether as a regular edit, as an undo, or as a restore
THEN the edit is rejected
Acceptance criteria:
- It’s not possible to have multiple properties with the same label in the same language at the same time by reverting an edit.