Rothamsted-Ecoinformatics / farm_rothamsted

Custom farmOS features for Rothamsted Research.
GNU General Public License v2.0
6 stars 1 forks source link

Zeros not displaying in plot attributes #590

Closed aislinnpearson closed 11 months ago

aislinnpearson commented 11 months ago

Hi @paul121

We found a small (possible?) bug today where column levels with the name '0' don't upload to the plots tab (instead it's just a blank cell) but do upload to the variables tab.

image_ image

The reason I am not sure if it's a FarmOS bug is because excel. I wasn't sure opening the csv in excel was removing the zeros from the document before we uploaded it (although I would have expected to get an error if this happens, and it uploaded fine). Double checking by opening the file in QGIS also suggests the zeros are still there but maybe not displaying in farmOS?

image

The files can be accessed here: https://rothamstedfarm.farmos.net/plan/111

paul121 commented 11 months ago

Good catch! These values are being uploaded correctly, there was just a bug that was not displaying the 0 values. This can be a common bug because the number 0 or string "0" can be equated to an empty or null value in PHP. Easy fix.