Project

General

Profile

Actions

Feature #11150

closed

Allow searching of facts as types other than string

Added by Imri Zvik over 9 years ago. Updated over 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 #1

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2554 added
  • Pull request deleted ()
Actions #2

Updated by Dominic Cleal over 9 years ago

  • Category set to Search
  • Assignee set to Imri Zvik
  • Translation missing: en.field_release set to 63
Actions #3

Updated by Imri Zvik over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #11282: search on numeric facts is broken if using "~". added
Actions #5

Updated by Dominic Cleal about 9 years ago

  • Related to Bug #12194: Can't search for multiple facts in foreman 1.10.0-RC1 added
Actions #6

Updated by Dominic Cleal about 9 years ago

  • Related to Bug #12458: Facts search vulnerable to SQL injection added
Actions #7

Updated by Dominic Cleal about 9 years ago

  • Related to Bug #12547: Search raises PGError on feeding a non-integer value for a integer field added
Actions #8

Updated by Dominic Cleal about 9 years ago

  • Related to deleted (Bug #12547: Search raises PGError on feeding a non-integer value for a integer field)
Actions #9

Updated by Dominic Cleal almost 9 years ago

  • Related to Bug #12959: Host search based on fact value using LIKE clause does'nt work added
Actions #10

Updated by Dominic Cleal almost 9 years ago

  • Related to Bug #13035: Host fact search using ~ operator doesn't automatically add wildcards added
Actions #11

Updated by Timo Goebel over 8 years ago

  • Related to Bug #13838: Searching for hosts by facts does not return all hosts added
Actions

Also available in: Atom PDF