Page MenuHomePhabricator

When merging two items, reuse conflicting labels as aliases
Closed, ResolvedPublic

Description

A user merged two items: Q15124738 and Q2637222.

As you can see in the diff special:diff/135689715, everything except Italian label and description was merged since a label and a description exist in Q2637222, too. It would be very difficult to find a solution for merging conflicting descriptions but we can save conflicting labels by adding them as aliases.


Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:21 AM
bzimport set Reference to bz65990.
bzimport added a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

Change 178062 had a related patch set uploaded (by Addshore):
When merging items, reuse conflicting labels as aliases

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

Patch-For-Review

There is a question in my commit as not sure which way this should be implemented...

Option 1 (implemented), when ignoreConflicts for labels is passed any labels will be merged into aliases, if not ignoreConflicts for labels is passed then the merge would still not happen

Option 2 (not implemented), when merging any items the option to ignoreConflicts for labels is removed thus if there is ever a conflict it will ALWAYS be merged into aliases.

Comments?

My approach would be:

  • Keep the target label
  • Keep the target aliases
  • If the source item label is different than the target item label and the label isn't already in target aliases, add it to target aliasses
  • For each source item alias: If it's not the target label and not already in the target aliasses, add it

So the target (lowest Q) "wins", but no variants get lost.

I guess I will do the above and remove the ignore Conflicts flag for labels then?
Comments?

Change 178062 merged by jenkins-bot:
When merging items, reuse conflicting labels as aliases

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