we should prepare a migration to repair old instances with lat,lon as strings, as with the new validation this can not happen anymore, or we should allow our map component to accept strings also.
@txau i do not think is related.
There are several aspects to consider here.
@simonfossom probably you are in the better position here to guide us as to what is the correct experience for the different type of users when faced with this situations. Especially then when and where to report that the value is wrong and we failed to parse the data. Or simply ignore all errors and just do nothing, but that will be very confusing to admins.
@RafaPolit sounds complicated. Can't we just make sure that via validation the values stored in the database are always floats instead of strings? In the case of the existing data, can we assume most of it is going to be properly parsed during the migration?
And how do we migrate those values that can't be parsed? (like the double decimal places reported here: #2779) Do we just discard those and give no option for the user to fix them trying to reverse engineer their data?
It's an option, I'm OK with that.
@RafaPolit can you provide an example of double decimal that can't be parsed?
I linked it on the above comment. How do you parse 3.55676.4333 ? Which number is this?
@RafaPolit I understand. I guess we have no option but zeroing out the values. Maybe we can create some entries in the activity log for this migration so users are aware of which ones were zeroed out.
Look into reporting the affected documents that couldn't be parsed into the ActivityLog collection.
We have decided not to tackle the 'resilience' of the map at this point, and assume that data is correctly formed.
- We probably want to report the 'unparsable' values and log them in the ActivityLog
When an unparsable value is found, should the migration:
We cannot leave the value unchanged, it will break the UI as it is doing now, which is the whole point of this migration.
We should unset the field.