(Seemingly wrong) order of moderated posts by same user

AI-generated summary

When approving two held posts from the same user, Jonathan5 expected them to appear in the topic in the order they were submitted. However, they appeared in the order they were approved. JammyDodger suggested using a rake task, posts:reorder_posts, which can reorder posts according to their creation time. This task can be run with or without specifying a topic ID. For example, to target a specific topic, use rake "posts:reorder_posts[1234]".

Two of a new user’s posts were held for moderation.

I approved the second, later one before approving the first, earlier one. (The second one appeared at the top of the screen and I didn’t read the first one until later.)

What I expected - the posts would appear in the topic in the order that they were submitted.

What happened - the two posts appear out of order (ie in the order that they were approved).

Is there any way of reordering these two posts?

Thanks.

I don’t think there’s a way through the UI without doing the split/merge or copy/paste dance, but there is a rake task that could do it if you have server access (and are comfortable performing them). Here’s an example of it, and also how it could be adapted to target a specific topic: