[CFGUI-99] Defining a YAML list directly through a custom property creates null nodes Created: 14/Aug/19  Updated: 28/Mar/22

Status: Open
Project: Definitions App
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Martin DrĂ¡pela Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2019-08-14-15-41-53-318.png     PNG File image-2019-08-14-15-44-15-796.png     PNG File image-2022-03-28-14-37-21-048.png    
Issue Links:
Problem/Incident
is caused by MGNLCT-118 DOC: Describe Select Box - contenttyp... Closed
Relates
relates to MGNLCT-55 Generate a select field to limit entr... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 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.)



 Comments   
Comment by Christopher Zimmermann [ 25/Mar/22 ]

Do you know if this is still the case? Otherwise I will close as "Inactive".

Generated at Mon Feb 12 00:45:01 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.