DependencyTrack / DependencyTrack/frontend

Sorting of version fields is not numeric

Open
#757 2 comments 0 reactions 0 assignees View on GitHub
defect gnomes help wanted
Dominant language
Vue
Stars
171
Forks
250
Avg merge
11h 12m
Merged PRs (30d)
82

Description

### Current Behavior

currently the order of versions is not always sorted by the numeric version number.

If you have eg. composer packages, there version number is prefixed by a `v` and with that the sorting is not done numerically.

e.g.

- v1.0.0
- v10.0.0
- v2.0.0

if it is mixed with eg. npm components, there the version number is not prefixed.
Than the Sorting of npm packages are correct but the composer packages are also sorted at the buttom (v is after every number).

### Steps to Reproduce

Have 3 Components with version numbers like v1.0.0 v2.0.0 and v10.0.0

### Expected Behavior

it should sort numerically like this:

- v1.0.0
- v2.0.0
- v10.0.0

if mixed with npm packges it should look something like this:
- 1.0.0
- v1.0.0
- 1.5.0
- v2.0.0
- 9.0.0
- v10.0.0

### Dependency-Track Frontend Version

4.7.x

### Browser

Mozilla Firefox

### Browser Version

_No response_

### Operating System

Windows

### Checklist

- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/frontend/issues) for whether this defect was already reported

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.