I am using v. 2 and would like to be able to create a report that shows what crops I have, in what locations and what sizes. Ideally I would want to be able to select which growing season as well.
I am not very experienced at php, but do use quite a bit of mysql on vb .net platform.
If there is not something within the current structure that can give this sort of report is there a template I can follow to create it ?
@oliverp44 If you are willing to write some Python you can probably build a custom report to include whatever you like by pulling data from the farmOS API.
We also have a farmOS.js library for performing similar API requests using JavaScript: Introduction | farmOS
a report that shows what crops I have, in what locations and what sizes
This API endpoint will give you all your Plant assets: /api/asset/plant
The location field on each asset will summarize where it is currently located.
As for size, that will depend on how/where you are tracking that.
The nice thing about a Python script is it allows for quick experimentation. If you end up making something thatâs generally useful, a next step might be to build a module that does the same thing directly in the farmOS UI (via PHP/JS).
Worth noting (in case you or anyone else who finds this thread werenât aware) that you can also get a lot of the same information directly in the farmOS UI already by going to Records > Assets > Plant (or directly to this path: /assets/plant). This page lists all Plant assets, along with their current location, and has options to filter by crop/variety, season, and more. You can also export the results to CSV.
I was interested how other people do this sort of thing as producing lists of current crops and planning seems a fairly fundamental requirement for farming. As the information is all within farmOS it seems a shame to run a tandem spreadsheet.
Iâve been thinking about a favorite filter or quickfilter if you likeâŚ
Very often itâs the same filter beeing used, so a quick way to slecte a saved filter would be nice
That would be a nice feature! In the meantime, a quick tip/shortcut is to save your filtered results as a bookmark in your browser. The filter options are stored in the URL string, so that works!
Where is there best place to post ideas to be included going forward ? the size of the fields in ha would be really useful for the planting asset page. Also to have the site version number next to âPowered by FarmOSâ would be useful when comparing what version you are on.
Where is there best place to post ideas to be included going forward ?
This (the forum) is the best place for general discussions/ideas currently. If someone wants to take on the work to implement something specific, they can work on it in a branch and open a pull request to propose including it. Or they can build it in a separate module that others can download (this has the most freedom for experimentation because it doesnât need to go through the farmOS core review process/considerations/testing).
Also to have the site version number next to âPowered by FarmOSâ would be useful when comparing what version you are on.
Fun fact: we actually did have this in v1 for a short period of time. I ended up deciding to remove it because it felt a bit like a security risk (if someone knew you were running a very old version that had a known security issue they might be able to exploit it). However thatâs a pretty low risk I think. And anyway, a bit moot in v2 becauseâŚ
In v2 we actually DO make the version visible publicly in the /api endpoint in the meta.farm section of the JSON.
That looks similar to what would after. I am guessing that each planting must be specific to one field / bed otherwise it will show up as too many locations.
My coding is not up to much at the moment but if there was something basic and specificâŚâŚ
I am guessing that each planting must be specific to one field / bed otherwise it will show up as too many locations.
Actually it handles multiple plants per location - this is a common requirement for interplantings, or splitting a bed up into multiple subsections with multiple crops. The module also had a toggle to organize the timeline âby areaâ or âby plantingâ. The screenshot above is âby plantingâ. Here is what âby areaâ looks like: