Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
319 stars 157 forks source link

[Tests] Validation needed for Place importer to handle missing coordinates for places #598

Closed rudokemper closed 2 years ago

rudokemper commented 3 years ago

Describe the bug Currently, when the Place CSV importer encounters a row with no coordinates given for the lat and long fields, it seems to be importing these with a (0,0) or null geography.

This is different from simply adding a Place via the Terrastories UI and not providing latitude and longitude -- these places don't show up on the map, as expected and desired.

To Reproduce Steps to reproduce the behavior:

  1. Download the Terrastories sample import spreadsheets and save the third tab (Places) as a CSV https://docs.google.com/spreadsheets/d/1Ir6TC5THEoQKk-98JZ5KpTjXd-R6yMmA/
  2. Delete the lat/long coordinates for one of the place rows and save the CSV.
  3. As a logged in admin or editor user for a community, navigate to the Places page in the back end (/admin/places?locale=en)
  4. Import the CSV you just edited
  5. The row will still be imported into Terrastories with null values, and showing up at 0,0 (off the coast of Africa) on the Terrastories map.

Expected behavior Let's make it so that the importer does not add any null values to lat/longs when a Place doesn't have any in the CSV, resulting in wonky null island placement.

Screenshots image image

rudokemper commented 3 years ago

Related issue: https://github.com/Terrastories/terrastories/issues/599