Ticket Created
over 2 years ago

CIQQA-1392

settings-editor doesn't use the defaults settings for array settings

Both in the simulator and in ConnectIQ Android when I have the following settings and I start to add a new item all the fields are empty instead of being filled with the default values:

  <setting propertyKey="@Properties.u" title="@Strings.settingsUsersTitle" maxLength="10">
    <setting title="@Strings.settingsSensorName" type="string">
      <settingConfig id="n" type="alphaNumeric" maxLength="12" required="true"/>
    </setting>
    <setting title="@Strings.settingsSensorAntIdOptional" prompt="@Strings.settingsSensorAntIdPrompt" type="number">
      <settingConfig id="i" type="numeric" min="0" max="65536" required="true"/>
    </setting>

    <setting title="@Strings.settingsSetZoneTitle" type="number">
      <settingConfig id="b" type="list">
        <listEntry value="0">@Strings.settingsSetNone</listEntry>
        <listEntry value="1">@Strings.settingsUseUserZones</listEntry>
        <listEntry value="2">@Strings.settingsSetMaxHr</listEntry>
        <listEntry value="3">@Strings.settingsSetManualZones</listEntry>
      </settingConfig>
    </setting>

    <setting title="@Strings.settingsZone1Min" type="number">
      <settingConfig id="0" type="numeric" min="0" max="254" required="true"/>
    </setting>
    <setting title="@Strings.settingsZone1Max" type="number">
      <settingConfig id="1" type="numeric" min="0" max="254" required="true"/>
    </setting>
    <setting title="@Strings.settingsZone2Max" type="number">
      <settingConfig id="2" type="numeric" min="0" max="254" required="true"/>
    </setting>
    <setting title="@Strings.settingsZone3Max" type="number">
      <settingConfig id="3" type="numeric" min="0" max="254" required="true"/>
    </setting>
    <setting title="@Strings.settingsZone4Max" type="number">
      <settingConfig id="4" type="numeric" min="0" max="254" required="true"/>
    </setting>
    <setting title="@Strings.settingsZone5Max" type="number">
      <settingConfig id="5" type="numeric" min="0" max="254" required="true"/>
    </setting>
    <setting title="@Strings.settingsMaxHr" type="number">
      <settingConfig id="m" type="numeric" min="0" max="254" required="true"/>
    </setting>
    <defaults>
      <entry>
        <default id="n"></default>
        <default id="i">0</default>
        <default id="b">0</default>
        <default id="0">0</default>
        <default id="1">0</default>
        <default id="2">0</default>
        <default id="3">0</default>
        <default id="4">0</default>
        <default id="5">0</default>
        <default id="m">0</default>
      </entry>
    </defaults>
  </setting>

All the fields except "n" should have 0 as default but they have nothing (empty string)