Project

General

Profile

Bug #12191

Array-typed smart parameters changed to broken JSON

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

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Parameters
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
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

Is duplicate of Foreman - Bug #11375: Smart class parameters turn YAML to string when using a multi line yamlClosed2015-08-16

History

#1 Updated by Anonymous over 6 years ago

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

#2 Updated by Anonymous over 6 years ago

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

Also available in: Atom PDF