Closed DaoyuT closed 3 weeks ago
Copying over more info from https://github.com/google/ground-platform/issues/1895:
When LOIs are imported for a job that is not published, they do not show up in the map as they are not associated with any jobs.
We can bundle the import/delete LOI action within the publish job action:
More context: https://github.com/google/ground-platform/issues/1714#issuecomment-2200410314
From @rfontanarosa - this should be solved now when you click publish they get cleaned up
For bug #1714, we did a quicker fix #1958 that shows LOIs imported for new unpublished job. However, if user don't publish the job after importing LOIs, those LOIs would still exist with no job associated to it. Although they won't be rendered in the map view since they don't belong to any valid job, it's still bad to have these useless data sitting in the database.
One solution is to delete these LOIs that don't belong to any valid job every time the user hits the publish button. On top of that we could also bundle the import/delete LOI action within the publish job action, like mentioned in bug #1714.