Page MenuHomePhabricator

Add UserMerge support to Translate
Closed, ResolvedPublic

Description

Translate needs a UserMergeAccountFields subscriber to support UserMerge.


Version: unspecified
Severity: enhancement

Details

Reference
bz67778

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:33 AM
bzimport set Reference to bz67778.

Please explain what this bug is about.

Any table that stores a user's id or username needs a handler for the UserMergeAccountFields hook in the UserMerge extension. It'll be necessary for bug 47918.

If Translate already supports Renameuser, adding support for UserMerge is simple, see I64f178ca186fa72d4163cf28191c45e9bac97d17 for an example in CodeReview.

*shakes head* Can someone please first make the extensions use the same hook or at least the same format for the same data.

(In reply to Niklas Laxström from comment #3)

*shakes head* Can someone please first make the extensions use the same hook
or at least the same format for the same data.

No, because they do different things. Renameuser only needs to change things if you're storing the user's name. UserMerge needs to update rows if user id is stored as well.

Depending on how you're storing the data, you might need to use a different hook point as well (ex: AccountAudit in I4deffe2c9969f9a1a4a679b1ee2a9f902a59fcab).

(In reply to Kunal Mehta (Legoktm) from comment #4)

(In reply to Niklas Laxström from comment #3)

*shakes head* Can someone please first make the extensions use the same hook
or at least the same format for the same data.

No, because they do different things. Renameuser only needs to change things
if you're storing the user's name. UserMerge needs to update rows if user id
is stored as well.

But in your example you are providing the same data just in slightly different formats, or what am I not understanding?

Change 145785 had a related patch set uploaded by Nikerabbit:
Add UserMerge support

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

This is not possible to fix in Translate unless UserMerge gains capability to deduplicate rows.

Change 145785 merged by jenkins-bot:
Add UserMerge support

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