sregistry icon indicating copy to clipboard operation
sregistry copied to clipboard

Faulty date sorting

Open xeniorn opened this issue 2 years ago • 1 comments

Describe the bug Sorting by build date within one collection of containers sorts the dates alphabetically rather than chronologically

To Reproduce Open any container collection and try to sort column by build date. Not sure if date format is editable, but it definitely happens when the date is formatted like "Sept. 21, 2022, 9:46 a.m."

Expected behavior Sorted chronologically

If applicable, add versions and screenshots to help explain your problem. image

(does not happen in the all collections view since the date there is in the YYYY-MM-DD format, but possibly the sorting there is also set as text sort rather than date sort)

xeniorn avatar Jan 10 '23 11:01 xeniorn

Thanks for opening the issue! That particular table is on this page https://github.com/singularityhub/sregistry/blob/cdc23dbf3886fdc7fff6430cb34b31029936fa09/shub/apps/main/templates/collections/view_collection.html#L101 if you’d like to take a shot at fixing the sort.

vsoch avatar Jan 10 '23 18:01 vsoch