When a topic is fully merged into another topic we close it and schedule it for deleting. But last time I changed this place I added a bug – when merging all posts in topic except the first one the topic was closing too.
If the OP is not merged into another topic, the original topic should neither close nor be marked for deletion. This PR fixes this.
I am curious about the second part of the condition, where you skip split_topic small actions. I understand you do this to skip the small action that is generated right before this method is called. I think there is an edge case here if you move some posts two times in a row. First time you do not select all posts, do the action and a small action post is created. Then you do it again, without selecting the small action created previously. The system will think you selected all posts, but no, because you did not select the small action from the first move.
I might be wrong and even if I am not, I do not think it makes sense fixing it, unless you find something more serious.
I am curious about the second part of the condition
Yeah, it’s a pretty tricky place :), I myself spent some time today trying to remember what does it mean. And it was me who introduced this condition a month ago :), I think it’s worth adding the comment here.
I’ve added a comment. Could you please take a look at it and confirm if it makes sense?