Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6691

DefaultValue on comboBoxField switcher in switchable field not working for boolean values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.9
    • 6.2.8
    • None

      Minimum sample:

              showImage:
                $type: switchableField
                field:
                  $type: comboBoxField
                  defaultValue: false
                  datasource:
                    $type: optionListDatasource
                    options:
                      - name: false
                        value: false
                      - name: true
                        value: true
      

      Expected: Default value is shown on initial dialog opening
      Reality: Default value not working. It must be alphanumeric, as the documentation states here: https://documentation.magnolia-cms.com/display/DOCS62/Field+definition.

      However, this is a pity, as often times switchable fields and select fields in our code base have true/false values.

      Developer notes
      A] explicitly mention in DOCu that boolean/number values has to be closed in apostrophes.
      B] Fix in the code
      C] Use checkbox in such case (might be not possible)?

        Acceptance criteria

              rkovarik Roman Kovařík
              cchard Christopher Chard
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 16m
                    16m