Changing ownership of a post and then changing the username of OP, will still show old username in post edit history

I’m not sure if this is a known issue, because I couldn’t find a similar post on the forums here but I might’ve overlooked something.

If you change the ownership of a post from user A to user B, and then you change the username of user A to C, and you view the post edit history of that post you changed ownership, it’ll still show "Ownership transferred from A to B" even though the image/username after that message is correct.

Example:
original username was mozzarella and it was later changed to mozzarella2 after the ownership of that post was changed.

4 Likes

@gerhard I guess this is a tiny spot we missed?

4 Likes

That’s really hard to fix and it requires a full table scan of the post_revisions table. This edge case is probably not worth the performance impact.

I think it’s best if we simply stop putting the usernames in the edit reason.

6 Likes

Yeah we only really need user id there

4 Likes

https://github.com/discourse/discourse/commit/14af90df5b68548872eb06d0875c9ba41c9ecf70