Project

General

Profile

Actions

Bug #12191

closed

Array-typed smart parameters changed to broken JSON

Added by Phillip Schichtel over 8 years ago. Updated over 8 years ago.

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

Description

I have a smart parameter of type array.
I set the value to a dashed list (of package names in my case) like this:

- puppet3
- facter2
- nginx-custom-dev

I can enter this without any problems, but when I want to update the value (e.g. add a new entry), this list will be presented like this:

"- puppet3\r\n- facter2\r\n- nginx-custom-dev"

Confirming the change (even if you haven't changed anything at all) will store the value as a string.

Entering the list as JSON results in a similar problem:

["puppet3", "facter2", "nginx-custom-dev"] will be turned into "[\"puppet3\", \"facter2\", \"nginx-custom-dev\"]"

So the list value will be turned into a string. Editing and saving a node with such a parameter will wrap the string again everytime it's saved, adding more quotes and escaping blackslashes.

Expected behavior:
Obviously preserving the original representation of the value or at least a compatible and valid representation.


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #11375: Smart class parameters turn YAML to string when using a multi line yamlClosedDominic Cleal08/16/2015Actions
Actions #1

Updated by Anonymous over 8 years ago

  • Is duplicate of Bug #11375: Smart class parameters turn YAML to string when using a multi line yaml added
Actions #2

Updated by Anonymous over 8 years ago

  • Category changed from Web Interface to Parameters
  • Status changed from New to Duplicate
  • Difficulty deleted (easy)
Actions

Also available in: Atom PDF