Project

General

Profile

Actions

Feature #11150

closed

Allow searching of facts as types other than string

Added by Imri Zvik almost 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Today, all the facts are stored as strings, and therefore integer comparison doesn't work on them.
There should be a way to handle different types (integer, floats etc).

In order to avoid hard coding either in the database or the code, I was thinking about using ext_method in app/models/concerns/hostext/search.rb which will either guess the type from the value, or use a setting and will then use CAST to perform the right comparison.


Related issues 6 (0 open6 closed)

Related to Foreman - Bug #11282: search on numeric facts is broken if using "~".ClosedImri Zvik08/04/2015Actions
Related to Foreman - Bug #12194: Can't search for multiple facts in foreman 1.10.0-RC1ClosedDominic Cleal10/16/2015Actions
Related to Foreman - Bug #12458: Facts search vulnerable to SQL injectionClosedDominic Cleal11/12/2015Actions
Related to Foreman - Bug #12959: Host search based on fact value using LIKE clause does'nt workClosedDominic Cleal12/30/2015Actions
Related to Foreman - Bug #13035: Host fact search using ~ operator doesn't automatically add wildcardsDuplicateDominic Cleal01/07/2016Actions
Related to Foreman - Bug #13838: Searching for hosts by facts does not return all hostsRejectedTimo Goebel02/22/2016Actions
Actions

Also available in: Atom PDF