How to list all the current Plant Quantities in my vegetable garden Field?

Hello,

I currently pay for GrowVeg and like it but, it being a cloud service, I don’t know for how long it will exist and fear losing all my historical data at some point. I’d rather own my data.

So I decided to try to self-hosting farmOS and use it to manage my little 1ha family farm. We just have a very simple vegetable garden and will soon plant an orchard. Congratulations on the work thus far.

I’m still trying it and exploring its possibilities. I created all my organisational assets and input some seeding and transplanting. But I quickly ran into some blocking issues, mostly related to reporting:

  1. I’d like to have a report on my vegetable garden’s current situation. I have a Field. containing multiple Beds. I can see a list of Plants and their Quantities for a given Bed. But I’d like to be able to list all the Plants in that Field maybe grouped by Bed or something. How can I do this?

  2. I will always need the same reports with a particular Filter. I’d like to be able to save some filters and give them names so that I could easily recall them later. How can I do this?

Thank you in advance.

3 Likes

Hi @nununo - welcome to the forum! :slight_smile:

I wonder if you could post some screenshots from your current system to illustrate what you’d like to be able to do. That might help others provide suggestions here.

Just to be sure I understand, can you tell me which pages you’re looking at to get the information currently? There may be some options, or at the very least workaround, to make things easier.

If you can filter to your desired records with the existing Views (Records > Assets / Logs / Quantities), then one suggestion is to simply bookmark the page with your filters applied. Then you can easily get back to the same page with the same filters.

If you need filters that don’t exist, then it might warrant a new feature request. Feel free to drop ideas in this topic, or start a new dedicated one if it makes sense.

I should also mention, there is work happening on a “Crop Planning” module, which might help with some of the things you describe. It’s still in “alpha” stage right now, and although it’s functional, I would hesitate to recommend it until it’s a bit easier to use. But if you’d like to give it a try the module can be found here: GitHub - mstenta/farm_crop_plan: Crop plan type and related features for farmOS. (ALPHA 3.x IN DEVELOPMENT)

Highly recommend reading through this forum topic to understand what it does (and doesn’t do): farmOS Crop Plan module v3 alpha release

2 Likes

Hi Mike,

Thank you so much for your reply. I take the opportunity to thank you for all the work you’ve done. I’m very impressed with farmOS. I am an ERP developer (SAP ABAP) and really like how you make everything so versatile and flexible and yet at the same time so grounded in a solid data model.

I don’t really have a system right now. I started using GrowVeg but didn’t populate it fully because I didn’t feel comfortable with it being a cloud service. Also, I didn’t find that its diagrammatic approach is of much use. I currently use GrowVeg mostly to find out when and how to plant each species and because they have an amazing chat service where I can ask questions about agriculture.

I will try to explain my needs. I have two distinct needs: State and Log. The Log is pretty much covered already, as far as I am able to understand. The State is where I’m still struggling. I am trying to use this page:

Records > Assets > Plant

It is already great, except for two things:

  1. It doesn’t let me filter by Location. I would like to be able to list which Plants are in a particular bed like Bed 3, but also which Plants are in Field A, since my Beds are hierarchically grouped under Fields;
  2. It is missing the quantity. I would like to be able to know how many Onions I currently have in Field A, even if scattered across multiple Beds. Maybe this doesn’t make sense, conceptually. Maybe there is a better way to accomplish this.

While writing the above I had an idea. If I pre-create all the Harvest logs beforehand, maybe by listing all the pending Harvest logs I could get a good enough report of what Plants I currently have. Still, I think this would be missing the aggregated quantities, at least.

Bookmarking a particular filter is a great alternative to the named filters I proposed. Works fine for me. Thanks.

Well, as said above, I really wish the Records > Assets > Plant page would allow me to filter by Location, recursively. If you agree, I can go ahead and create a request for this feature in the repo. Earlier today I had a look at farmOS code in the hope that I could understand how to add the extra filter but I didn’t succeed. Unfortunately I have no knowledge of PHP or Drupal. I do intend to try again once I have a bit more time.

I ran into the “Crop planning” module and didn’t try it because it’s alpha. And also because I first wanted to understand what’s in the core to be sure I’d understand its added value. Thanks for the tip. Now I’ll definitely try.

Looking forward to read your reply.

Again, thank you so much for all the work.

Regards,
Nuno

2 Likes

@nununo Welcome to the forum and farmOS! From your response to Mike, it feels like you’ve really dug into the existing UI and data-model more thoroughly than the average new farmOS user… nice job!

This would be a great feature! We’ve talked about this before, but I can’t find the tracking issue for it.

If you want to open the feature request, it should probably be a Drupal.org issue under the farmOS project: https://www.drupal.org/project/farm

Also a great feature we should have. We were just talking about this on the most recent monthly call. I don’t see the issue for this one either, but to recap what we found during the call:

The simple version of what you’re talking about would be showing the inventory quantity at the asset level. (Then however you filter the assets, you can see all the inventory quantities on that view - at a per-asset level.)

As Mike linked during the call, inventory field would need to be added to the asset/log views similar to how the group field is added by the group module;

https://github.com/farmOS/farmOS/blob/f01dd2524911c16fe492d45df50651a7a80cd39c/modules/asset/group/farm_group.module#L63

The views field is already defined, just not added to the (any?) views right now;

https://github.com/farmOS/farmOS/blob/3.x/modules/core/inventory/farm_inventory.views.inc

The more complex version would be figuring out how to “roll up” the quantities for separate plantings. That might start to fall into the realm of a custom report… (especially if Onions is actually many different distinct plant types).

2 Likes

Thank you @Symbioquine for your thorough reply!

I just posted a Feature Request for allowing to filter by Location. It’s here. I hope I got it right.

As for the quantities, I’m glad you’ve already considered it. After reading your explanation I do see that there is some complexity to it and that there are several different ways to implement it. I’ll carry on populating farmOS with my little reality and try to start using it to better understand what I really need.

What exactly do you mean by “custom report”? The only reports I find in farmOS are the more technical ones under the Administration menu.

Also, I will try to participate in the next monthly call.

2 Likes

We also have a development call weekly on Thursdays at 9 AM Pacific (Los Angeles) Time.

2 Likes

I’ll respond in more detail to this limitation (and feature request) in a moment, but wanted to note: even though you can’t filter by location directly in Records > Assets > Plant, it is possible to see all the assets currently in a specific location by going directly to that location’s Asset record and clicking the “Assets” tab. This will show the same list of assets as the main list, but filtered to only include ones that are currently in that location. So that’s one way to do it. But it doesn’t currently provide an option to see assets that are in child locations, so you would need to go to each Bed to see what’s in it.

It is worth noting: if you are including geometries, then you can pretty quickly see what (and how many) plant assets are located in each field and bed by looking at the map on Records > Assets > Plant. They will be “clustered” with an icon showing how many are in the area, and when you zoom in the clusters split up to be more granular. Clicking on the icon will show you a list of links to individual assets.

Thanks for opening that! We actually have two existing feature requests, which are related:

The goal of this one is the same as yours, I think, although your description is probably better. I might close yours as a duplicate, and copy the description over to the existing one.

I’m pretty sure I started exploring this in a branch on my fork a while back, and got an initial proof of concept working, but never got around to finishing it and opening a pull request. So I think that’s the next step. I’ll try to dig it up…

However, I did not look into the “optionally show assets in child locations” part. That’s going to add complexity, but I agree it would be useful.

This one would extend what I suggested above (going directly to a location asset to see assets within it) to add the ability to see assets in child locations as well.

farmOS itself doesn’t have any built-in reports. It just has a placeholder “Reports” module (not enabled by default) that other custom modules can depend on. All it does is add a “Reports” item to the main menu, so modules can provide their own reports as sub-items. This gets into the realm of custom Drupal development, but the possibilities are vast within that.

1 Like

I think this is the branch I started experimenting with:

It needs to be rebased and cleaned up a bit… looks like there are some irrelevant commits included as well.