Page MenuHomePhabricator

Make it impossible to set the same content in the same language for label and alias
Open, Stalled, LowPublic

Description

Problem:
Currently, a redundant entry can be made as a label and alias. This leads to unwanted redundancy.

If the label in language X is edited to become the same as one alias in language X, the old label is lost. This lead to a loss of data.

Solution:
Any attempt to add a label or alias that duplicates an existing label or alias in the same language should be rejected on the server-side. The user should get an explanation and call to action to solve the problem.

Copy of the error message:

  • TODO

BDD:

Reject duplication of labels or aliases in the same language

GIVEN an Item or Property
WHEN trying to add a label or alias that duplicates an existing label or alias in the same language
THEN the edit is rejected
AND the described error message is shown (see copy)

Acceptance criteria:

  • Reject duplication of labels or aliases in the same language

Community communication:
Who we needs to keep in the loop and in what way:
Who this could be interesting for and in what way:

Original:
BDD (similar to T212869):

Acceptance criteria:

  • Given any Item or Property, it's not possible to save a pair label-alias with the same content in the same language via any interface.

Open questions:

  • Does it happen that, in order to convert an alias into a label, some software tries to add the label first (first edit) and then delete the alias (second edit)?

Event Timeline

The label and the alias can't be the same (in that case, they're redundant). An alias (alternative name for an item) that is exactly the same as the label doesn't play any role, that alias isn't any alternative name for an item.

The label and the alias can't be the same (in that case, they're redundant). An alias (alternative name for an item) that is exactly the same as the label doesn't play any role, that alias isn't any alternative name for an item.

What if I need to make the alias the label? Or vice versa? Don't I need an intermediate step somewhere to duplicate one or the other?

No, you shouldn't need any intermediate step as you would continue being able to modify multiple labels and/or aliases in a single edit. In fact, if you need to make the alias the label, things would be easier because you would only have to add the label (the alias would be automatically removed on saving your changes).

Lydia_Pintscher changed the task status from Open to Stalled.Feb 27 2017, 9:46 AM
Lydia_Pintscher triaged this task as Lowest priority.
Lydia_Pintscher subscribed.

It is currently not one edit. You click save once but that triggers multiple edits. They can result in issues as @Izno mentioned.

Thanks for noticing, @Lydia_Pintscher, and sorry for the mistake, @Izno.

Would this problem only arise in scenario 2? If so, perhaps 2 could behave like 1 while there's no better solution, that is to say...

  1. In a given item, if there's an alias "A"@lang and not a label "A"@lang, defining a label "A"@lang shouldn't be possible (until alias "A"@lang is manually removed).

Please note that you should take into account not only manual insertions (e.g. https://www.wikidata.org/w/index.php?title=Q957548&diff=1268719940&oldid=1268710970), but also insertions through QuickStatements (e.g. https://www.wikidata.org/w/index.php?title=Q957548&diff=1268710970&oldid=1259272612), OpenRefine and other tools for massive editing.

I think that "lowest" priority is maybe a bit too low. While a solution isn't found, maybe a bot can be programmed in order to remove duplicate aliases and (if possible) to send a standard warning message to the users who added them.

I think that "lowest" priority is maybe a bit too low. While a solution isn't found, maybe a bot can be programmed in order to remove duplicate aliases and (if possible) to send a standard warning message to the users who added them.

It might be time to revisit this task now that the very similar T212869 is resolved and the editing frequency is a problem at the technical level.

abian renamed this task from A label and an alias should never be the same in the same language and item in Wikidata to Make it impossible to set the same content in the same language for label and alias.Aug 31 2020, 3:10 PM
abian updated the task description. (Show Details)

I have simplified the description and removed from it the features that would never have been possible, leaving the description as in T212869.

Are we sure that this is "Lowest" priority? Given that aliases which duplicate labels are an additional burden on WDQS (although probably not such a big burden), maybe we can raise a bit the priority of this ticket.

Last we looked at it it was a very small number and likely would not have made much of a difference wrt WDQS. The mul language code and removing redundant labels based on it are going to have a more significant impact.

Manuel updated the task description. (Show Details)

Example: if the label is edited so that it becomes the same as an existing alias (https://www.wikidata.org/w/index.php?title=Q11906650&diff=1778265038&oldid=1604959354), we lose a valid name of the entity because the edit isn't rejected. In cases of massive edits through QuickStatements or OpenRefine, this could cause some damage.

I would propose to raise the priority at least to low, or medium.

Epidosis raised the priority of this task from Lowest to Low.Jan 29 2023, 9:32 AM
Epidosis updated the task description. (Show Details)