[GH-ISSUE #893] Sort of hostnames not correct #2498

Open
opened 2026-03-14 04:15:58 +03:00 by kerem · 0 comments
Owner

Originally created by @MalteKiefer on GitHub (Dec 22, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/893

Server Info (please complete the following information):

  • OS: Debian 11
  • Browser: Edge
  • RMM Version (as shown in top left of web UI): 0.10.5

Installation Method:

  • Standard
  • Docker

Agent Info (please complete the following information):

  • Agent version (as shown in the 'Summary' tab of the agent from web UI): 1.7.2
  • Agent OS: Windows 10

Describe the bug
There is a typical error in the sorting of the hostname.
Here is a snippet how to solve this in JS:

var collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
var myArray = ['1_Document', '11_Document', '2_Document'];
console.log(myArray.sort(collator.compare));
[
  "1_Document",
  "2_Document",
  "11_Document"
]
image
Originally created by @MalteKiefer on GitHub (Dec 22, 2021). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/893 **Server Info (please complete the following information):** - OS: Debian 11 - Browser: Edge - RMM Version (as shown in top left of web UI): 0.10.5 **Installation Method:** - [ ] Standard - [X] Docker **Agent Info (please complete the following information):** - Agent version (as shown in the 'Summary' tab of the agent from web UI): 1.7.2 - Agent OS: Windows 10 **Describe the bug** There is a typical error in the sorting of the hostname. Here is a snippet how to solve this in JS: ```javascript var collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'}); var myArray = ['1_Document', '11_Document', '2_Document']; console.log(myArray.sort(collator.compare)); ``` ``` [ "1_Document", "2_Document", "11_Document" ] ``` <img width="98" alt="image" src="https://user-images.githubusercontent.com/59220985/147093462-70792985-081e-4459-8493-a64656a65752.png">
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#2498
No description provided.