Project

General

Profile

Actions

Bug #8052

closed

Smart class parameters with ERB snippets are broken for other that String types

Added by Petr Chalupa about 10 years ago. Updated over 6 years ago.

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

Description

Smart class parameters currently have broken validation and type-casting when used with ERB snippets. It tries to validate the value with the ERB without evaluation when key is being saved. It was hacked around it in Staypuft. How to fix it: Validation and type-casting has to be done on classification when ERB can be evaluated; SafeRender needs to be aware of the ERB parameters, they need to be validated and properly type-casted based on the given KeyValue (this association is missing currently).

The hack for Staypuft is in this file https://github.com/theforeman/staypuft/blob/master/app/models/staypuft/concerns/lookup_key_extensions.rb


Related issues 5 (1 open4 closed)

Related to Foreman - Refactor #9142: Unify validate_regexp and validate_list for lookup value/keyDuplicate01/28/2015Actions
Related to Foreman - Bug #10088: Smart class default parameter interpreted as stringNew04/08/2015Actions
Related to Foreman - Bug #9673: YAML type casting fails for lookup values in 1.7.3ClosedMarek Hulán03/06/2015Actions
Related to Foreman - Bug #9787: Default values of smart class parameters can't be JSON or YAMLClosedMarek Hulán03/16/2015Actions
Blocked by Foreman - Bug #9044: Tests can fail randomly on mac.succClosedMarek Hulán01/20/2015Actions
Actions #1

Updated by Dominic Cleal about 10 years ago

  • Category set to Parameters
  • Priority changed from High to Normal
Actions #2

Updated by Marek Hulán almost 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Marek Hulán
Actions #3

Updated by The Foreman Bot almost 10 years ago

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

Updated by Ivan Necas almost 10 years ago

  • Bugzilla link set to 1183643
Actions #5

Updated by Dominic Cleal almost 10 years ago

  • Blocked by Bug #9044: Tests can fail randomly on mac.succ added
Actions #6

Updated by Dominic Cleal almost 10 years ago

  • Translation missing: en.field_release set to 32
Actions #7

Updated by Dominic Cleal almost 10 years ago

  • Related to Refactor #9142: Unify validate_regexp and validate_list for lookup value/key added
Actions #8

Updated by Marek Hulán almost 10 years ago

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

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #10088: Smart class default parameter interpreted as string added
Actions #10

Updated by Dominic Cleal over 9 years ago

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

Updated by Dominic Cleal over 9 years ago

  • Related to Bug #9787: Default values of smart class parameters can't be JSON or YAML added
Actions

Also available in: Atom PDF