Moving posts should preserve edits history

AI-generated summary

A bug was reported by Nacho_Caballero where edits made to the first post of a topic are lost when the post is moved to a different topic. Canapin was able to reproduce the issue and provided a video demonstrating the lost edit history. However, a fix was recently merged by renato, as seen in this commit, resolving the issue.

If a user creates a new topic and another user makes some edits, when an admin selects it and moves it to a different topic (with or without preserving the creation order), the edits are lost.

This only happens on the first post of the topic (the edits on any further posts are preserved), which is the same behavior of timed/scheduled topics (all edits are lost and the created_at date is reset).

Steps to replicate:

  1. Create a new topic
  2. Post a reply to the first post
  3. Make some edits to both posts
  4. Select both posts and move them to an existing topic

Expected behavior: The edits on both posts are visible.
Current behavior: The edits on the first post are not visible.

3 Likes

I was able to repro :+1:

We can see on the video that the edit history is lost on the first post after moving it.

Thanks for the report!

2 Likes

Hey @Nacho_Caballero,

A fix was merged yesterday:

https://github.com/discourse/discourse/commit/701ae8764efa1384a093d6270daed8fc2122320c

Thank you!

3 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.