-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalize quanity reports #212
Comments
Another use case was mentioned in the forum - charting rainfall weather observations https://farmos.discourse.group/t/rainfall-charting-module/111/2 |
Great ideas! We actually have an issue open for one of them already (adding graphing to the quantity report): https://www.drupal.org/project/farm/issues/2941620 I love the idea of "saving" reports. It's already sort of possible right now just by bookmarking, because the exposed filters are applied as query parameters to the URL. But having something baked into farmOS would be cool too.
Interesting question! I think ultimately use-cases will probably boil down into two types: "simple" and "complex". The quantity reports are relatively "simple" right now, as they are just a single database query with filters applied ("select all quantity measurements from logs, and apply these filters") - so you just end up with a list of rows. The weight report is a bit more "complex" in that it has to run multiple queries and then process the results of them in different ways. I think the simple quantity reports (with graphs and the ability to save them) cover a big set of potential cases, and are super flexible (they can be used to measure anything!) - so maybe it's an 80/20% rule thing. The other 20% of "complex" cases require their own custom reports. I like the idea of making the "saved quantity reports" appear on the same level as the "complex reports" though, if that's what you were suggesting. So ultimately you have all your reports in one place... some provided by modules, and others that you created yourself with the quantity report tool. |
Good idea about saving via bookmarking - that's great. For many people that is already fairly intuitive.
Yep! I'm glad you pointed out that there are "simple" and "complex" reports. I might try and start thinking about generalizing the graphing of simple reports. Creating an API or just a standardized object to send to javascript graphing library. |
That's a great idea! The Quantity Report is generated by the Views module, so my thought is we can make a Views plugin that adds a graph to the View automatically, pulling the data from the results. Some things to figure out with that... but perhaps we can look at it together. Either way, I think that could plug into a generalized object for graphing. |
I'm going through and closing old/stale issues and discussions. Moving forward we are encouraging general discussions take place on the farmOS community forum. GitHub will be reserved for bug reports and pull requests. @paul121 feel free to open a new forum topic (or use an existing one) and link to this if you want! |
Creating an issue to further track a feature we've talked about, and something I think is pretty feasible - further develop
farm_quantity_report
to save reports and graph values.@mstenta already created the
farm_quantity_report
- it's a great start that I believe is providing some of the fundamental pieces required here. I'm curious what the next steps are to extend this to "persist" in a custom, user defined report under thereports
tab. (Right now thelivestock weight report
is hard coded and lives under the report tab)After a user creates a
quantity report
via the existing form, it would great to supply an option to "save" thatreport
for future viewing (as additional quantity values are collected).Ideas that come to mind:
report
tab, the saved report could include a table and graph of quantity values (similar to whatlivestock weight report
currently does).report_add_hook
for modules to easily add simple reports to the view. (Couldlivestock_weight_report
be replaced by simply providing a report withasset_type
asanimal
,log_type
asobservation
andmeasure
asweight
to this futurereport_add_hook
??The text was updated successfully, but these errors were encountered: