Yesterday I watched a great BAD Camp Drupal session: A Smarter Approach to Recurring Events in Drupal. The session focused on both the technical & UI challenges associated with creating recurring calendar events, and shared how the Smart Date module handles this. The presenter was excellent! Definitely worth watching once the recording is out - meanwhile slides are here
So… this got me thinking again about potential “time” related improvements we could make to logs:
Log duration - Optionally store a start and end timestamp with logs. This would help facilitate “time tracking” features for farmOS.
Recurring logs - Smart Date has a great UI for creating recurring events (eg: create an event weekly until a specified date) - we could likely adapt this to work with Logs.
Improved calendar integration - There were some great examples of creating events directly from a calendar view (inspired by other popular calendar apps). Would this be useful from a farm-planning perspective? Click on the calendar to “draft” up some logs?
Just thought this could spark more conversation and new ideas! I’ll share the session’s recording once it’s released, the more abstract parts re: handing the UI of dates are definitely worth a watch.
Couple of quick thoughts, because some of these ideas have come up before…
Log duration - Optionally store a start and end timestamp with logs. This would help facilitate “time tracking” features for farmOS.
I think “time tracking” needs to be separate, because a task may have multiple people working on it, with potentially multiple separate durations. Ultimately I think this is the best way to handle the concept “log duration” in the future, because it will allow for the most granularity.
Recurring logs - Smart Date has a great UI for creating recurring events (eg: create an event weekly until a specified date) - we could likely adapt this to work with Logs.
We can’t have individual logs be “recurring” because we need to be able to say “this log was done, and these ones were not”.
Generally speaking, “logs” in farmOS are different than typical “calendar entries” because of this. We are explicitly tracking “what actually happened”, whereas calendars only track “what was scheduled to happen”. So it’s easier to make recurring rules for a single event in a calendar system than in a real record keeping system.
Improved calendar integration - There were some great examples of creating events directly from a calendar view (inspired by other popular calendar apps). Would this be useful from a farm-planning perspective? Click on the calendar to “draft” up some logs?
This would definitely be useful! In farmOS 1.x we just use the Calendar module to render logs in a calendar View, but we don’t have any options for creating new logs from those pages.
As much as I like the idea of simple time tracking I have to agree with @mstenta. It would be important that >1 people could “contribute” to the time tracking of a task. >1 pleople working on a task at different times or even at the same time would enable a very good estimation of how long the task will take in the future. So maybe we could even develop a ‘workload calculator’. Once a task is finished one could say the task have been finished by for example 3 people in 1h or 1 person in 3hs (just an idea).
What I have done for time tracking is just using the quantity field to log ‘work’ as a label of time that it took me to complete that task. Then I can do a quantity report to get total work time. It is easier for me cuz it’s just me, but you could establish a convention for the quantity label for who did the work.
I really like the idea of recurring or being able to create a task that occurs in a schedule, and as @mstenta mentioned, maybe the plan module fixes that. I would like to be able to create logs to do something on a regular basis and then mark it done as I complete it too.
Reoccurring tasks I would find useful to, I clone tasks daily and it can be cumbersome. It works but also leaves human error at 5 AM when I’m running through my tasks with two drops of coffee on the farm lol! Any calendar integration would be very nice, I mean I’m bias in my flavors however I feel like this would be a good thing no matter what.
As far as log duration goes, I’m don’t specifically have a use for it. I track my mushroom events with activities so I know when they’ve entered fruiting and have harvests etc.
I would be very interested in a time tracking feature. I think it would be better handled if time was an asset.
There are many situations for me where I would like to start and stop multiple timers inside 1 log.
For example: My sow gives birth log
Stop gestation period timer
Start weening period timer
Start piglet age timer (for each piglet, this could be 12 trimmers alone)
I envision this being a section in a log on the left hand side like asset, equipment, location, etc.
Once there you can select as many timer assets as you want. Then a check box to stop them as part of that log.
If you just wanted to associate a timer to a log without stopping the timer you can do that also. This would give you a way to link multiple logs together. Maybe the timer asset can keep track of how many times it was attached to a log. This could give you a “count” function.
Just my thoughts on time and being versatile across many situations.
Great thoughts everyone I agree that time tracking & recurring logs should be taken a step further, there are many benefits in doing so. I’m still curious about the most simple use case of duplicating a log on a recurring schedule outside the context of a plan. Basically an extension of the current “Duplicate log” functionality (with obvious downsides). But chatting with @mstenta, I’m convinced a very simple Recurring Log plan would suffice & be worth the extra effort of the user!
For some reason I can’t edit my first post. But here is a link to the original Drupal session which sparked my interest in this: https://youtu.be/UMoYD152uOo
The overview of how recurring events work, are represented in the UI & explanation of the RRULE commonly used to model them starts here: https://youtu.be/UMoYD152uOo?t=133 before going in the smart_date module specifics. I’m not sure if there would be much benefit in explicitly using the RRULE concept for farmOS logs/plans, but the session had some good examples and dialogue on UI considerations since these inputs can get quite complex.
Full agree that time tracking needs to be able to account for multiple users as we rarely do tasks individually.
For us it would be tantamount on API integration as well, we have a timeclock that is already API linked into our payroll system so being able to push time tasks out from our timeclock system into farm os would be great.
Having better planning integrated into farmos would be awesome. Right now we have a hard time creating a hypothetical farm plan, then recording it against actuals. For me it would be very nice to have a planning module, then allow you to link those planned events to actual events if you did actualize them, leaving them in some uncompleted state so that you could track plan v. actual better.
For us we are doing microgreens so our seed to harvest time is around 14-20 days, while FarmOS already appears to be a massive simplification to our process, I can see duplicating events as being highly difficult.
Additionally we would like to get to the point where we are tracking expected plan with actuals at a very granular level. For example, cycling lights on and off, cycling hydroponic pumps on and off, cycling misters on and off.
Therefore, it would be cool to see some integration with sensors, for example if I have a sensor indicating if my pump is on and off, tie it to recurring calendar events that say from 10-1015 AM my pumps should have been running and be able to check a sensor log against the expected recurring calendar event
FYI there has been some new thinking around how to store “time spent” on tasks in farmOS, using a new “Time Quantity” type. I created a new issue for it here: https://www.drupal.org/project/farm/issues/3196844
@mbillion Cool! I really think this could be a great Field Module! @jgaehring is working on 2.x support in Field Kit now, and @paul121 and I are going to be working on the prerequisites for the “time quantity” stuff on the server side soon, so it’s conceivable that a “Time Tracking Field Module” isn’t too far off!
@Botlfarm and @mstenta I completely agree with the time tracking feature for animals. Here are a couple other applications to such a tool:
Chickens–incubation period (these have different temperature requirements), and counter until egg laying capacity. There are other timers with chick integration into flocks (6-10 weeks) that would be helpful as well. If these timers are attached to alarms that would be great.
Rotational Grazing: I know we try to get our chicken flocks through various blocks at certain times of the year and have to take them off the field 90-120 days before harvest (Food Safety laws). This would be another application for timing the grazing periods.
For reoccurring tasks, yearly sprays that are done during specific tree development periods would be another helpful application for both reoccurring logs as well a timer function for the window for effective spraying.
I’m finding myself looking for this option! It would be amazing. I’m tracking delivery miles, I would like a timestamp at the start when I log starting miles, and a timestamp on the end when I log the end miles.
It would also be great to start a log at the beginning of an activity, say “cultivating the kale”, start the log, do the work and when you’re done click “end” or something, and the time is logged.
Joel Salatin stresses the importance of “time and motion studies” as one of his top ten keys to a successful farm enterprise. He says to set benchmarks, know time and labor inputs and know what does a procedure cost.
FWIW @paul121 started the data architecture for this in Time quantities [#3196844] | Drupal.org - which is currently “Needs review”. Note that this only adds the data storage pieces, but not the UI for “starting/stopping” a timer. Although that feels like it would be an ideal Field Kit module! cc @jgaehring
Hey everyone - I’m interested in this also - we have some activities (like Ground Cover or Solarization) which also naturally are better first for a start / stop functionality.
I’d love to restart this discussion sometime also!
we have some activities (like Ground Cover or Solarization) which also naturally are better first for a start / stop functionality.
To be clear, the changes in https://www.drupal.org/project/farm/issues/3196844 are specifically for USER time tracking. It introduces a new Quantity type with a user reference field. This field is not required, so in theory you could use it for non-user time tracking, but that’s not what it’s intended for. The “start” and “stop” time fields are hidden from the user and are only used to generate the “total” time (aka the quantity value) anyway. They are only their to aid in future “punch in/out” UI/UX functionality, which could also be handled outside of farmOS in a client-side app like Field Kit or Asset Link.
For tracking ground cover / solarization / etc I would probably suggest just using the existing standard quantity with a measure of time and develop your own convention around it.