Additional Asset Fields

@WHFarms thanks for sharing that! It would help to have a short description of each to make sure I’m understanding them correctly, but at quick glance it does seem like a lot of them would benefit from being modeled using the “asset attribute operations” ideas discussed in Generalizing Log-based Asset Attributes

That said, there’s no timeline on that work at this point, so it won’t help in the short term. I would hesitate to recommend adding a bunch of custom fields though, unless you are also planning an upgrade path to migrate the data to the core model in the future.

The nice thing about farmOS is it’s flexibility: you can add whatever fields you want! The bad thing about that flexibility is: you are responsible to maintain any custom stuff you build. So sticking closer to the core model has the benefit of outsourcing that maintenance to the larger community. Of course, there are tradeoffs either way. Community-maintained code is slow to change, and that’s a good thing because it has more momentum and stakeholders who depend on it. Custom code can be nimble, “move fast and break things”, serve your individual needs, etc… but it’s all your responsibility.

A simple first step that might be worth considering is making a custom module that adds some Animal-specific “Flags”, which you can use to tag each animal asset. farmOS core only provides three flags out of the box (“Priority”, “Monitor”, and “Needs Review”) which can be applied to any asset or log type. But it’s also possible to provide your own types, and limit which asset/log types they can be applied to.

I’ve seen this used to create a flag called “Bummer” on a lambing operation, for example.

Flags are nice because they are easily visible/filterable from the main asset lists out-of-the-box. But adding/removing them is not tracked via logs, so you won’t be able to easily track when an asset was flagged, or when flags changed on it. If you need that kind of history then logs are the recommended way to record that. And if/when we have the “asset attribute operations” feature built, there will be a lot more flexibility to log changes against specific asset attributes. I think that will be a very nice addition to the core data model.

Hope that all makes sense and helps you think about options!

2 Likes