Project

General

Profile

Bug #3024

Sort order columns

Added by Felix Barbeira about 8 years ago. Updated over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

It affects to the section "Facts". If I go there and try to sort my machines using for example the fact "uptime_days", foreman sorts using only the first digit of the value. For example: a machine with 113 of uptime for foreman it's a lower value than a machine with a 2 days uptime. Show the column "Value" in the attached image for a better explanation.

I´m using theforeman version: 1.2.2

foreman.png View foreman.png 129 KB Felix Barbeira, 09/04/2013 07:08 PM
Foreman

History

#1 Updated by David LeVene over 6 years ago

A "workaround" for this is to use the hammer api & sort function provided by Unix.

  1. hammer fact list --search uptime_days --per-page 250 | sort -nr -k3,3 -t"|"

The sorting is happening like it is a "word", if you remove the -n - it sorts the way foreman does. The fix for this issue would be to confirm if all the facts are a numeric number - or perhaps a more long term approach is to have a new (?) column in the database which defines what kind of search is applied to a fact.

Also available in: Atom PDF