Project

General

Profile

Feature #27926

Host parameter should be accessible in Report Template without setting "Safemode rendering" to false

Added by Marek Hulán about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
Reporting
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1746780

Description of problem:
Currently, the host parameter is accessible in report template only using host.info['parameters']['Parameter Name'] but needs to set "Safemode rendering" to false. We should able to access this when "Safemode rendering" is set to true

Here is an example template

<%- load_hosts().each_record do |host| -%>

<%- report_row({

'Name': host.name,
'LOB': host.info['parameters']['SomeParameter']
}) -%>

<%- end -%>

Version-Release number of selected component (if applicable): 6.5

How reproducible: Always

Actual results: Getting Error message --> Warning! There was an error rendering the parameterreport template: undefined method '#info' for Host::Managed::Jail (Host::Managed)

Expected results: parameter should be accessible when "Safemode rendering" to true

Associated revisions

Revision 634ca8b6 (diff)
Added by Ondřej Pražák about 1 year ago

Fixes #27926 - Allow host params in report templates (#7084)

History

#1 Updated by The Foreman Bot about 1 year ago

  • Assignee set to Ondřej Pražák
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7084 added

#2 Updated by The Foreman Bot about 1 year ago

  • Fixed in Releases 1.24.0 added

#3 Updated by Ondřej Pražák about 1 year ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Tomer Brisker 8 months ago

  • Category changed from Statistics to Reporting

Also available in: Atom PDF