Proposal: instead of having a dedicated log type for movements, I would like to be able to move assets with potentially any log type.

One of the major benefits of this approach would be that seeding and transplanting logs could be used for assigning location, which they are not currently. Related: #2394839: Easier UI for adding Plantings

I'm starting to think through all the specifics and considerations around this idea. I will use this issue to document them.

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

I'm starting with a new Field Collection called "Movement" (field_farm_movement) with three sub-fields from the original movement logs: "To" (area reference), "From" (area reference, optional), and "Geometry" (geofield, optional).

I'll need to write an update function to migrate data from the old fields to the new ones. And there is a lot of related location code to update.

I'm not sure what the fate of the Movement logs themselves will be, but I'm leaning towards migrating them to "Activity" logs and removing the Movement logs altogether.

m.stenta’s picture

Moving forward...

Using the "Current location" pseudo-field in asset edit forms will automatically create an Observation log with the movement fields filled in and a title of "Current location: [area(s)]".

Using the "Move" button from asset lists will create an Activity log with the movement fields filled in and a title of "Move [asset(s)] to [area(s)]".

m.stenta’s picture

Movement logs will be automatically migrated to activity logs.

Any extra fields on movement logs that don't exist on activities will be moved there.

  • m.stenta committed 5b516ec on 7.x-1.x
    Issue #2871165: Any log can be a movement
    
m.stenta’s picture

Status: Active » Fixed

This is done. It was a complex change across a few different modules. All updates will be packaged in the next release of farmOS: #2876592: [META] farmOS 7.x-1.0-beta13

m.stenta’s picture

Project: Farm Log » farmOS

All farmOS repositories have been merged into the farmOS distribution (see #2876992: Merge farmOS repositories into drupal.org/project/farm). I'm going through and moving all open issues from the various project issue queues to the central queue now...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.