Standard Energy Efficiency Data (SEED) Platform™ is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.
Other
111
stars
54
forks
source link
Extra_data text fields strip prepended zeros #4728
Describe the bug
If you import zip code data into an extra_data column and set that column's data type to text, the data will appear in the json data correctly, but when requesting the data on the inventory list page (POST /api/v3/properties/filter/) it is returned without the prepended zeros for zip codes that start with zero.
Expected Behavior
Text columns should return the exact value from the database
Actual Behavior
Prepended zeros are being stripped
Steps to Reproduce
Import the following csv
Custom ID 1,Custom Postal Code
1,00123
2,01010
Set the Custom Postal Code column data type to text
Go to the inventory list view, note that the full 5 digits are not shown
Check that the database has all 5 digits in the extra_data column
@axelstudios -- is there a case where the zip code would be defined as a number or alpha-numeric, so that it sorts properly numerically? Or maybe that sorting happens if it is set to text?
Describe the bug If you import zip code data into an extra_data column and set that column's data type to
text
, the data will appear in the json data correctly, but when requesting the data on the inventory list page (POST /api/v3/properties/filter/
) it is returned without the prepended zeros for zip codes that start with zero.Expected Behavior Text columns should return the exact value from the database
Actual Behavior Prepended zeros are being stripped
Steps to Reproduce
Custom Postal Code
column data type to text