jenkinsci / jenkinsci/lockable-resources-plugin

DataTable sorting by timestamp is alphabetic, not "calendaric"

Open
#485 3 comments 0 reactions 0 assignees View on GitHub
good first issue Triage ui
Dominant language
Java
Stars
99
Forks
205
Avg merge
2d 13h
Merged PRs (30d)
8

Description

### Jenkins and plugins versions report

LockableResources-2.18 custom built with table sorting commit added (as of PR #470 https://github.com/jenkinsci/lockable-resources-plugin/pull/470/commits/d07b8c8bb5d2b7ef98080517f7b47789019bed09)
Jenkins LTS 2.387.2

### What Operating System are you using (both controller, and any agents involved in the problem)?

Linux server
Windows browser (Firefox)

### Reproduction steps

Open lockable resources page with several items locked in different months (can be prepared via API `LR.setReservedTimestamp()` call)

Click table header to sort by timestamp

### Expected Results

Sorting is by actual timestamp (date-time) value, ascending or descending as chosen.

Defined (non-null) timestamps are always first.

### Actual Results

Sorting seems to be by months naming (alphabetic).

In descending order, I see Mar-Jan-Apr:
![image](https://user-images.githubusercontent.com/1636756/232060691-fc2f7929-d5ae-4d59-9c9b-48cabf8e3a2f.png)

In ascending order, I see lots of empty lines (no timestamp) and then some months.

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.