Bug #4639

Syntax of arrays in parameters changed when edit is changed.

Added by Martin Hovmöller over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Stephen Benjamin
Category:Smart Variables
Target version:Sprint 21
Difficulty: Bugzilla link:
Found in release:1.3.2 Pull request:
Story points-
Velocity based estimate-
Release1.4.4Release relationshipAuto

Description

As I understand if, the syntax for arrays should be JSON/YAML stype, so if I wish to have an array of hashes the value for a parameter should be something like "[{ "hostname": "host", "password": "secret" }].
Adding this works fine, but when the change is saved, foreman changes the syntax, so the next time I edit the host the value is instead "[{"hostname"=>"host", "password"=>"secret"}]".

Trying to edit anything on this host then gives me the error "(<unknown>): did not find expected ',' or '}' while parsing a flow mapping at line 1 column 2" since foreman doesn't get the syntax it itself created, which means that this value has to be manually changed every time anything is changed on the host in question.

Associated revisions

Revision 801a90d1
Added by Stephen Benjamin over 3 years ago

fixes #4639 - array in lookup_value incorrectly displayed in form

History

#1 Updated by Dominic Cleal over 3 years ago

  • Category set to Smart Variables
  • Found in release set to 1.3.2

#2 Updated by Stephen Benjamin over 3 years ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Stephen Benjamin
  • Target version set to Sprint 21

#3 Updated by Anonymous over 3 years ago

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

#4 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.4.2

#5 Updated by Dominic Cleal over 3 years ago

  • Release changed from 1.4.2 to 9

Apologies, I missed this from 1.4.2. Retargeting for 1.4.3 if we do it, else 1.5.0.

#6 Updated by Dominic Cleal over 3 years ago

  • Release changed from 9 to 1.5.0

#7 Updated by Dominic Cleal over 3 years ago

  • Release changed from 1.5.0 to 1.4.4

Also available in: Atom PDF