Uploaded image for project: 'Definitions App'
  1. Definitions App
  2. CFGUI-99

Defining a YAML list directly through a custom property creates null nodes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Neutral
    • None
    • None
    • None

    Description

      While documenting MGNLCT-55, I've found out that the whole definition tree in the Definitions app freezes if you expand a list defined directly through a custom property other than name, such as value in the example below. The list-creating property creates a list of null and therefore unreferenceable nodes:

      model:
        nodeType: lib:book
        properties:
          - name: category    
            type: String 
            options:
            - value: fiction
              label: Fiction
            - value: poetry
              label: Poetry
      

      A workaround is to list the options through the superfluous name property first:

      model:
        nodeType: lib:book
        properties:
          - name: category    
            type: String 
            options:
            - name: fiction
              value: fiction
              label: Fiction
            - name: poetry
              value: poetry
              label: Poetry
      

      or use a nested mapping

      model:
        nodeType: lib:book
        properties:
          - name: category    
            type: String 
            options:
              fiction:
                value: fiction
                label: Fiction
              poetry:
                value: poetry
                label: Poetry
      

      both of which create a correctly expandable tree in the definition browser:

      (Tested in Community Edition 6.1.1.)

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                mdrapela Martin Drápela
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Bug DoR
                    Task DoD