diff --git a/rasa/core/exporter.py b/rasa/core/exporter.py index 58c567dbdbe2..ff1d31ac1205 100644 --- a/rasa/core/exporter.py +++ b/rasa/core/exporter.py @@ -241,6 +241,11 @@ async def _fetch_events_within_time_range(self) -> AsyncIterator[Dict[Text, Any] continue events = self._get_events_for_conversation_id(_events, conversation_id) + + # the order of events was changed after ATO-2192 + # we should sort the events by timestamp to keep the order + events.sort(key=lambda x: x["timestamp"]) + # the conversation IDs are needed in the event publishing for event in events: if (