QutEcoacoustics / workbench-client

workbench-client: a client side browser application for interacting with acoustic workbenches
Other
8 stars 1 forks source link

Removing Site / Point Location Information Does not Remove Longitude and Latitude from Baw Model #2040

Closed hudson-newey closed 10 months ago

hudson-newey commented 1 year ago

Describe the bug If a point / site has longitude and latitude set, when it is edited and the longitude and latitude fields are deleted (blank), the longitude and latitude is not removed from the model.

To Reproduce Steps to reproduce the behavior:

  1. Go to a point
  2. Click on "Edit this point"
  3. Set a longitude and latitude (e.g. latitude: 1, longitude: 1)
  4. Click "Submit"
  5. Observe that the point now has a longitude and latitude
  6. Click "Edit this point"
  7. Delete the longitude and latitude
  8. Observe that no warning / error message is presented to the user
  9. Click "Submit"
  10. Observe that the point still has a longitude and latitude

Expected behavior

  1. (Ideal) The user should be able to remove a site location by setting the longitude and latitude fields to empty
  2. (If this is the expected behavior) We should display an error message to the user conveying that it is not possible to remove latitude / longitude information from points

Desktop (please complete the following information):

Additional Information: This is a client side issue as the longitude and latitude is not being sent to the server when the location fields do not have a value

hudson-newey commented 10 months ago

There is also a related bug where if you navigate to a site's edit page and reload, the user will notice that the longitude and latitude information is not added to the model