Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-1893

Getvalues when used on a data container should return similar results when run on a classic array

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.3
    • Component/s: Built-in functions
    • Labels:
      None

      Description

      Consider the following JSON data and roughly equivlant classic array:

      Data Container:
      <pre>
      "data" data => parsejson('{
      "foo": [
      "alpha",
      "bravo",
      ],
      "bar": "zulu"
      }');
      </pre>

      Classic Array:
      <pre>
      "array[foo]" slist =>

      { "alpha", "bravo" }

      ;
      "array[bar]" string => "zulu";
      </pre>

      When using getvalues on array[bar] zulu is returned in the list of values as expected.

      However when using getvalues on a data container an empty list is returned. I expected to get zulu in the returned results.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10042 Nick Anderson
                Reporter:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel