Right now Areas are taxonomy terms. This is nice because it allows for Areas to be created on the fly (via a free-tagging Taxonomy Term reference field), and they are automatically hierarchical. In general, though, Taxonomy-based Areas are not very intuitive, and it would make more sense for them to be their own entity type Farm Asset type.

This would also allow there to be different "Area Types" (bundles), like "Field", "Structure", "Fence", etc, with fields that are specific to them. Structuring areas in this way would open the door to #2353125: Color coded area types (without patching Geofield, which was the old plan). It would also make it easier to implement #2353121: Area revisions before we move to Drupal 8 (see

Comments

m.stenta’s picture

Having the concept of "area type" throws a wrench into the possibility of creating areas on-the-fly, however. Imagine this scenario: you are creating a planting, and defining it's location... right now you can just type in a new area name and it will be created as a taxonomy term. There is no difference between "fields" and "greenhouses" in this system. Areas are always "farm_area" taxonomies.

But in a system where there are different area types, you wouldn't be able to create new areas on-the-fly without somehow defining their type. This would work for "Fields"... but what if you need to use "Greenhouses" as a type, and plantings need to be able to move between the two types. That's difficult...

So before I do this, I want to make sure that it makes sense to make Areas into their own entities, and have different types. It will open the door for some features (#2353125: Color coded area types and #2353121: Area revisions), allow different area types to have different fields, and overall make the system more organized... but it also comes with some disadvantages. Namely, areas would need to be defined before they are used (which maybe is fine - I think most other systems require this). And area hierarchies doesn't come out-of-the-box. But that could be implemented with an area_parent column in the farm_area database.

m.stenta’s picture

Status: Active » Postponed

I'm leaning towards leaving these as taxonomy terms for the time being. The benefits just don't outweigh the costs yet.

Postponing this for now... we can reopen for discussion if there is interest in putting together a full transition strategy that solves the issues outlined above, and provides an automated migration function.

Regarding #2353125: Color coded area types, see second comment: https://www.drupal.org/node/2353125#comment-9338757

m.stenta’s picture

Also up for consideration: should Areas be Assets? This would merge all the Area and Asset functionality together, which may or may not be what we want.

Some benefits of Areas as Assets:

Some questions:

  • Areas need to be hierarchical... but most other assets don't. Do we implement the Area Parent as a field ONLY on Area assets?
  • Do we make different asset types for each area type? This would allow different area types to have different fields, but it means more asset types to maintain.
m.stenta’s picture

Issue summary: View changes
Status: Postponed » Active

I would like to consider this for the 7.x-1.0-beta2 release, because it would enabled a lot of nice code cleanup, and Areas really do seem to make more sense as their own type of Asset. Reopening and modifying the title and description.

See the 7.x-1.0-beta2 roadmap here: #2452307: [META] FarmOS 7.x-1.0-beta2

m.stenta’s picture

Title: Make areas first-class entities » Make "Area" into a type of Farm Asset

Changing the title...

m.weinheimer’s picture

Can Areas as assets be hierarchal? I like the idea of them becoming assets. Greenhouses, high tunnels, can be moved, with considerable effort. We are planning to move our farm stand, in the near future. Some area classes that would be good additions would be: High Tunnels, Permanent Fences, Infrastructure Items like electric service entrance panel, well, power poles, solar and wind installations.

m.stenta’s picture

Can Areas as assets be hierarchal?

Not yet they can't, but that would be one of the prerequisites of this task: adding an ability to arrange assets hierarchically. That alone needs some consideration: how would it affect existing asset types? Does it make sense for other assets to be arranged hierarchically? Maybe in some cases? Perhaps each asset TYPE (ie: Area, Planting, Animal, etc) could have a checkbox to indicate whether or not assets of that type can be hierarchical - and if so then it enables a "Parent Asset" field on that type (along with a "Weight" for ordering). We should create a separate issue to discuss those things...

I like the idea of them becoming assets. Greenhouses, high tunnels, can be moved, with considerable effort.

Yea! There would be a lot of nice benefits if they became assets - the ability to "Move" them is just one, but there are a lot of cases where that would be useful. In general, it would also just help to organize some of the code in farmOS - deduplicate functionality that is currently shared between "areas" and "assets", so that everything is working the same.

m.stenta’s picture

Project: Farm Area » farmOS
Component: Code » Farm Areas

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...

m.stenta’s picture

For anyone following this issue, you may also be interested in the discussion happening here: #2905112: [META] Discussion: Asset membership vs location

m.stenta’s picture

Another important discussion to consider during this work: #2931505: [META] Discussion: Area Types

slarmour’s picture

After a bunch of thought, I struck on a whole different way to consider the issue of Asset Types and whether Area should become an Asset Type and conceptual structure generally. Here's my thinking at the moment:

Right now Assets include things like Plantings, Animals, Equipment, Groups, and additional ones like Compost and Bee colony, etc.

What is an Asset as a concept and what should it represent? In my mind, Assets as they are being used in farmOS seem to be to be similar to the term "capital," ("wealth in the form of money **or other assets** owned by a person or organization or available or contributed for a particular purpose"). While capital is most often used in terms of "financial capital," "human capital" is also being used more in business.

The best example I've seen on the conceptualizing of capitals is the work done by Integrated Reporting: http://integratedreporting.org/

They have a capital framework consisting of 6 capitals. Source: http://integratedreporting.org/wp-content/uploads/2015/03/13-12-08-THE-I... pages 11-12) --

"Financial capital" – available money

"Manufactured capital" – buildings and equipment and infrastucture owned

"Intellectual capital" – Organizational, knowledge-based intangibles such as intellectual property, patents, special processes, etc

"Human capital" – People’s competencies, capabilities and experience, and their motivations to innovate

"Social and relationship capital" – The institutions and the relationships within and between communities, i.e, the farm's network

"Natural capital" – All renewable and nonrenewable environmental resources and processes

In my mind, these are lovely, high level categories that could be used to structure the Asset Types. Here's an example of how we could incorporate those 6 categories into a hierarchy with the current Asset Types:

Built Assets <-- top most level adopts the naming of the 6 capitals
Buildings <--- one level down could be considered Asset SubTypes and this is the level the existing asset types would be incorporated
Equipment
Infrastucture

a more detailed view:

Financial Assets (Asset Type)
Savings (Asset SubType)
Bank account 1 (Asset)
Account Balance (Asset attribute)
Bank Name (Asset attribute)
Line of Credit
Accounts Receivables
Plantings<--- categorized under Financial Asset because these represent expected income
Animals <--- categorized under Financial Asset because these represent expected income

So how would the Area fit into this structure? Things like beds, forests, ponds would be considered either a Built Asset or Natural Asset. Area (dimensions) would actually be an *Asset Attribute* of the Asset. How about location? Same. Groups? Same. Example:

Natural Assets (Asset Type)
Bed (Asset SubType)
Bed 1 (Asset)
Bed Name (Asset Attribute)
Bed Area (Asset Attribute)
Bed Location (Asset Attribute)
Bed Active (Asset Attribute)
Bed Group (Asset Attribute)

For incorporating some sort of hierarchy for Assets, it may be worthwhile borrowing concepts developed for graphic design layout software "style sheets". Word, InDesign, etc all have a hierarchical way of organizing the order of formatting for specific objects. I could do some more digging to show how that works. But would it be enough to just define, for each Asset, what it's parent it?

Bed Parent (Asset Attribute)

Anyway, those are my thoughts. Would love comments/debate. :) Skye

slarmour’s picture

My formatting got messed up - hope this clarifies:

Financial Assets (Asset Type)
--Savings (Asset SubType)
----Bank account 1 (Asset)
------Account Balance (Asset attribute)
------Bank Name (Asset attribute)
--Line of Credit
--Accounts Receivables
--Plantings<--- categorized under Financial Asset because these represent expected income
--Animals <--- categorized under Financial Asset because these represent expected income

Natural Assets (Asset Type)
--Bed (Asset SubType)
----Bed 1 (Asset)
------Bed Name (Asset Attribute)
------Bed Area (Asset Attribute)
------Bed Location (Asset Attribute)
------Bed Active (Asset Attribute)
------Bed Group (Asset Attribute)

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

Another consideration: multi-use areas. From a recent support question:

Also, right now some of our fields are classified as cropland but they're also going to be paddocks that are grazed. Is there a way to classify them as both?

kaizerking’s picture

A field can be a stand alone and also a green housed. IMO, prime revenue generators should declared as 'Assests' , Asset types may be created like a field, A green housed field, an animal etc. Where as a plant cannot be a an asset as it is a perishable item.
An asset always exists for more than a financial year and has tangible value also capital in nature.where as a plant doesnt have a tangible value.A plant is rawmaterial from a manufacturing point of view.seeds are 'raw material' to produce.the rawmaterial cost is the seed cost. All other costs apart from seed cost spent till harvesting are 'production costs'.This way the exact cost accounting can be achieved.

m.stenta’s picture

@kaizerking Thanks for the input. farmOS defines "assets" a bit more loosely than in the strictly bookkeeping sense. My long term hope is to connect farmOS to something like Ledger (or external applications like GnuCash, QuickBooks, etc), and map "farmOS Assets" to "Bookkeeping Assets" in those systems. farmOS's record keeping goes beyond what is typically recorded in monetary accounting, so that we can track activities that happen in relation to "assets" internally. "Assets" in farmOS are used to represent "things of value that you are actively managing/tracking", which currently includes things like Animals, Plantings, and Equipment.

This issue in particular is about changing Areas (which are currently just simple Drupal Taxonomy Terms), and making them into full-fledged Asset types, alongside the existing ones. We are going to do this because in practice we are finding that the requirements overlap a lot, and it makes sense to think of Buildings, Fields, etc as assets in the same sense. This will also allow them to be archived, moved around (eg: a moveable chicken coop), etc etc.

Hope that all makes sense. Happy to discuss the finer distinctions of our current labeling and how it compares to accounting (and how we will eventually connect it). I suggest we open a forum thread, since it is more of a general discussion: https://farmOS.discourse.group

m.stenta’s picture

Version: 7.x-1.x-dev » 2.x-dev
Parent issue: » #3151233: [META] farmOS 2.x Data Model

Changing this to 2.x-dev - work is beginning on it! :-)

paul121’s picture

I think we can close this via #3182176: [META] Intrinsic asset geometry

m.stenta’s picture

Status: Active » Fixed

Yes! This can be closed! farmOS 2.x now has "Land", "Structure", and "Water" asset types, with automated migrations from the old Area types in 1.x.

Closing this issue feels like a momentous occasion. It was opened in 2014 - the early days of farmOS's development. Let's all take a moment to reflect on how far we've come. Cheers everyone! :-)

Status: Fixed » Closed (fixed)

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