Project

General

Profile

Bug #9787

Default values of smart class parameters can't be JSON or YAML

Added by Marek Hulán over 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Smart Variables
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

While #9673 fixed the issue for overrides, we have the same problem (double typecasting) for default values. So if there's no override for such parameter, we render the default value as true.


Related issues

Related to Foreman - Bug #9673: YAML type casting fails for lookup values in 1.7.3Closed2015-03-06
Related to Foreman - Bug #8052: Smart class parameters with ERB snippets are broken for other that String typesClosed2014-10-23

Associated revisions

Revision a2468540 (diff)
Added by Marek Hulán over 4 years ago

Fixes #9787 - correctly typecast default values

JSON and YAML default values were double typecasted, once by active
record and then by value_of_key method.

Revision 6d39d715 (diff)
Added by Marek Hulán over 4 years ago

Fixes #9787 - correctly typecast default values

JSON and YAML default values were double typecasted, once by active
record and then by value_of_key method.

(cherry picked from commit a2468540b62942a2a9adfb428003d5308df7ab56)

Revision e0b6f3ee (diff)
Added by Marek Hulán over 4 years ago

Fixes #9787 - correctly typecast default values

JSON and YAML default values were double typecasted, once by active
record and then by value_of_key method.

(cherry picked from commit a2468540b62942a2a9adfb428003d5308df7ab56)

History

#1 Updated by Marek Hulán over 4 years ago

  • Category set to Smart Variables

#2 Updated by Marek Hulán over 4 years ago

  • Related to Bug #9673: YAML type casting fails for lookup values in 1.7.3 added

#3 Updated by The Foreman Bot over 4 years ago

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

#4 Updated by Martin Hubert over 4 years ago

Thanks, the patch works for me. :-)

#5 Updated by Marek Hulán over 4 years ago

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

#6 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #8052: Smart class parameters with ERB snippets are broken for other that String types added

Also available in: Atom PDF