When doing a bulk-import (jsonl) replies to post are not imported correctly. Error reported is `Reply CreateAt property must be greater than the parent post CreateAt.`
This is a regression in 5.22.
Root cause is an optimization added in 5.22 which batch adds the replies. Unfortunately the logic is in error and mismatches the replies with the posts. Occasionally this will result in no error but the reply will appear under the wrong post. More often the reply will generate the error above, depending on the time stamp of the last post in every 1000 post batch.
1. Run the following CLI command in server: `bin/mattermost import bulk <bulk-import.json> --apply`. The bulk-import file can be stored anywhere, and the file path can be used in the cli command.
2. Once the import is completed, find the new team that's created by the import and find the test channel.
3. Verify that messages and replies are imported correctly on the center channel view.
4. Verify that messages and replies appear correctly on reply threads.
If this one could be changed to Resolved, I can go ahead and close it
Tested and verified on local. Bulk import works as expected with correctly imported replies.
Verified in prev.test (updated to 5.22.2-rc1) that all messages and replies show as expected.