Project

General

Profile

Actions

Bug #3024

open

Sort order columns

Added by Felix Barbeira about 11 years ago. Updated almost 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
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


Files

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

Updated by David LeVene almost 10 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.

Actions

Also available in: Atom PDF