Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Sorting/Ordering reports by timestamp in Mongo is not working #1197

@Velcrow81

Description

@Velcrow81

In reporting, it is not possible to order by date (timestamp) in an acending order. Only decending. Below is an example of reports ordered by timestamp ascending:
image

The same problem occurs if we run queries directly against Mongo in Studio 3T:
image

I got the timestamp from the top 5 documents and they have the same problem as in the frontend. Descending works but ascending is apparently random:

Ascending
637013082263970000
637012111923990000
637012506804020000
637019928394040000
637020792304050000

Descending
637041960614550000
637039299834670000
637035012714420000
637034735494500000
637033988174520000

The timestamp is stored as an array and that might be causing problems for the sorting, but I do not know why descending is working

Timestamp" : [
        637013082263970000, 
        0
    ]

Sorting should work on timestamp for both descending and ascending order

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions