Closed yhegen closed 5 months ago
@yhegen Thank you for bringing up the concern regarding the representation of lat and lng as text strings in the preview of the data model when defining the asset property field. The initial discussion involves showing empty strings for all types if there is no default value. Now we have taken your feedback into consideration, and we are actively working on addressing this. The issue reported regarding the creation of a new building asset without defining the c8y_Position property has been addressed and resolved in the latest build 1019.0.0.202307260546-15290c5.
In the 1019.1.2 build, if a number-type value is empty, the data model preview in complex property shows null. Therefore, we are closing this issue.
Description
I have defined an asset model "building". The asset has a complex asset property field "c8y_Position" (not required), including the properties lat (Number, no default value) and lng (Number, no default value).
When defining the asset property field, the UI shows the preview of the data model as follows:
Why are lat and lng defined as text string?
How to reproduce the bug
Once I start to create a new building asset without defining the property c8y_Position, I observed different behaviors:
Expected behavior
Because the properties lat and lng are defined as type Number, I would expect to not try to cast those as string text field, when the field is empty. I would expect to define the values lat and lng as null. So from my perspective, the correct model should look like this: