Transfer likes when moving a new topic into an existing one

(Erlend Sogge Heggen) #1

I just noticed that when moving a topic (not a reply) into another topic that already existed, the moved topic will lose its likes. Here’s an actual example of a topic that was merged into an existing one.

This happens because when we merge a topic into another one, we don’t actually move that topic, instead we close it and make a duplicate of it in the other topic.

This inadvertently strips the topic of its likes. Could we:

  • migrate the likes from the “moved” topic to the new post, and
  • remove the likes from the “moved” topic?

I realise this is more complicated than moving replies, but since moved replies do retain their likes, there’s an unexpected inconsistency here.

When merging posts, likes of the posts being merged do not add up to the final post
Moving the first post to a different topic doesn't actually move the post, it copies it
(cpradio) #2

FYI, this was noted back in Nov '14, but may have been missed in the noise

(David Rodríguez) #3

I’ve been working on this today and created a PR: Copy actions when moving first post by deivid-rodriguez · Pull Request #4701 · discourse/discourse · GitHub.

I just now found out that my approach is different from the approach proposed here. Here it is proposed that the likes are moved, I copied them instead.

(Alan Tan) #4

Hi @deivid-rodriguez, sorry for the late review here. I just merged your PR in

with some minor tweaks. Thank you for the great work :thumbsup:

(Alan Tan) #5

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.