Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Some locations on a farm are transitory or may change shape from season to season. To accommodate this fluid dynamic on a farm, users can retire locations that are no longer useful to them. Retiring a location is a “soft delete”, so the data and history about that location are not deleted. Instead, retiring a location makes it so that the user cannot access or associate items with that location. Specifically, retiring a location does the following:

  1. Removes that location from the farm map

  2. Removes that location from the possible location selection when creating a crop management plan

  3. Removes that location from the possible locations selections when creating a task

Special considerations around retiring a location

Since crop management plans and tasks can be associated with locations, we need to take special care to ensure we don’t abandon these entities when retiring a location. Users cannot retire locations where any of the following conditions evaluate to true:

  • 1+ tasks that are in “Planned” or “Late” status reference the location

  • 1+ transplant tasks that are “Planned” or “Late” status reference the location in the to_location field*

  • 1+ crop management plans that are “Planned” or “Active” status reference the location as its' current_location

If any of these conditions are true, the user will view an error message (see XXX) and be prevented from retiring the location until the appropriate conditions are met

* Transplant tasks are specifically called out based on their more complicated structure, but should fall under the first case as well.

Viewing historical locations

It’s reasonable that a user may want to view historical crop management plans or tasks associated with retired locations. As such, the read-only view for both “Completed” and “Abandoned” tasks will receive a special visual treatment to clarify that a location is retired, and hence won’t show up on the standard farm map view.

Forward looking

It is highly likely we’ll add a locations Listview in the future that will have different filters. One of these filters could be “Retired”, whereby users could view past locations.

  • No labels