Ticket Created
over 3 years ago

CIQQA-1391

settings-editor lets save "optional" numeric field with empty value and then fails to save again

I have the following settings:

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

The "i" field is "optional" (meaning it doesn't have the required="true") so the ConnectIQ Android settings editor lets it save with empty value. When I add the item.
However if after that you try to save it again then you get the "We were unable to update your settings at this time. Please try again later" error message.

To reproduce:
1. use the above settings

2. enter settings editor in Connect IQ Android

3. click on the array item ("users")

4. click on Add item

5. Fill in the 1st "n" (Name) field, leave the 2nd "i" field empty

6. Save Item

7. back arrow

8. Save

9. enter the settings again

10. click Save => you get the error message: We were unable to update your settings at this time. Please try again later

No matter what you do you get the error, unless you do one of these things:

a) "edit" the item we just added. Even if you only enter the editor and click "Save item" without changing, it will work again (only once)

b) you delete the added item