Project

General

Profile

Actions

Bug #10277

open

Sorting the log entries does not use year value

Added by Viktor Gurov almost 5 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Start date:
02/22/2020
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.4-p3
Affected Architecture:

Description

If you have on the one Status / System Logs page log entries from different months and years
clicking on the 'Time' column for ascending/descending sorting doesn't use year value

For example if you have entries from Dec 2019 and from Jan 2020 and Feb 2020 -
clicking 'Time' you will put Dec or Jan on top, but not Feb

Actions #1

Updated by Jim Pingle almost 5 years ago

You can force the type by using data-sortable-type="date" in the <th> tag for the header row of this column, but I'm not sure that would work here. It's worth a try.

You can also influence the sorting by using data-value="<x>" in the attributes of the table cell. See f467ea24cb3c3a98b370c2427ff1aa53d25f14a1 for an example. The problem with this is that the log data itself doesn't necessarily contain enough data to make assumptions usable for calculating a timestamp.

Check the sortable API docs for more ideas.

It's a non-issue with RFC 5425 format logs as the timestamp string contains enough detail and that detail is in a format which naturally sorts in the expected way.

Actions

Also available in: Atom PDF