Bug #16081

Facts page in core expects .host relation

Added by Daniel Lobato Garcia 11 months ago. Updated 11 months ago.

Status:Closed
Priority:Normal
Assigned To:Daniel Lobato Garcia
Category:Discovery plugin
Target version:Plugin 6.0.1
Difficulty: Pull request:https://github.com/theforeman/foreman_discovery/pull/294
Bugzilla link:
Story points-
Velocity based estimate-

Description

The /fact_values page in Foreman has a helper that expects fact_value.host at several places:

https://github.com/theforeman/foreman/blob/develop/app/helpers/fact_values_helper.rb#L18
https://github.com/theforeman/foreman/blob/develop/app/helpers/fact_values_helper.rb#L29

However, fact values for discovered hosts will not respond to that method.
You can call fact_value.host_id just fine, but not fact_value.host.

That causes a 500 on any /fact_values page that needs to show discovered hosts facts


Related issues

Related to Foreman - Bug #16082: FactValue association to Host should be against Host::Base Closed 08/12/2016

Associated revisions

Revision f9155577
Added by Daniel Lobato Garcia 11 months ago

Fixes #16081 - FactValue returns value for .host

The /fact_values page in Foreman has a helper that expects
fact_value.host at several places:

app/helpers/fact_values_helper.rb#L18
app/helpers/fact_values_helper.rb#L29

However, fact values for discovered hosts will not respond to that
method.
You can call fact_value.host_id just fine, but not fact_value.host.

That causes a 500 on any /fact_values page that needs to show discovered
hosts facts

History

#1 Updated by Daniel Lobato Garcia 11 months ago

  • Related to Bug #16082: FactValue association to Host should be against Host::Base added

#2 Updated by The Foreman Bot 11 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman_discovery/pull/294 added

#3 Updated by Daniel Lobato Garcia 11 months ago

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

Also available in: Atom PDF