There is a lot of under the covers metadata that has to be dealt with in migration. Ticket metadata is fairly well defined, as far as we get authorship, assigne, cc's, and modified / creation times for searching and sorting.
Comment metadata is another matter. When we first started down this road the decision was made to not worry about comment metadata and so we end up with something like this:
https://phabricator.wikimedia.org/T378#4196
A static identifier for the username from the system of origin, a timestamp, and the migrated comment.
There is a long road of compromises that has lead to this place but the current state is:
* Users create a new account from existing external sources (ldap and sul)
* Metadata for history across tickets of all systems is then associated with this user when they verify the email that they had in the historical system
* Comments are not updated(1) (i.e. remain static for imported content)
Erik raised the point to investigate this further, and so I have looked into it and Mukunda and I have talked it over. Part of the ongoing confusion and untenable situation we find ourselves in is some people find one group of compromises acceptable, and some do not, but we keep coming back around and renegotiating the issue. If we knew comment metadata was a full stop for the project I think we may have gone another route for accounts, although I'm honestly not sure as all methods have their big downfalls. It turns out merging history from accounts in completely unrelated and distinct systems isn't super easy.
The best compromise I think we can make without going back to the drawing board (and after confirming with Mukunda):
* Users still create a new account from existing sources
* metadata for tickets is still migrated (cc, author, owner) in post processing once we know who this person is in relation to the data we have from imported systems
* Comments, through fudgery of the highest order, are created natively for people who _already have accounts in phabricator at that time_ (and have the corresponding email as verified under their account) but are still the static thing seen above for users who do not exist. The people who do not have accounts at the time of migration, will not ever get their comments from the old system handled, however their creation timestamp metadata would be correct. Essentially, only the author would be 'hardcoded'.
I think we have to solidify this before more migration work can happen, because it's a big changing of the gears to get better comment handling beyond this. Hopefully @mmodell agrees?