Additional log "time" features - any interest?

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?

Some of these ideas were discussed here: Reduce date-time-entry to date-only-entry and I know we’ve discussed others elsewhere.

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.

5 Likes

Cool! Excited to check that out @paul121!

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.

I think our best bet for creating “recurring tasks” would be with a new “Plan type” that automatically generates logs. See this issue: https://www.drupal.org/project/farm/issues/2962368

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.

3 Likes

Hi @mstenta @paul121 , these are very interesting topics.

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

very good answer

that would be nice to have :slight_smile:

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.

3 Likes

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.

2 Likes

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.

3 Likes

Oh very interesting @BOTLFarm! I hadn’t thought of using timers in that way.

This reminds me of some of the thoughts in this issue: https://www.drupal.org/project/farm/issues/2630218

That issue is pretty old - and I’m not convinced that is the right way to do it… so perhaps we can take a step back and give it more thought.

Great thoughts everyone :smiley: 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! :grinning_face_with_smiling_eyes:

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.

1 Like

yes we would be interested,

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

4 Likes

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

Note that this is ONLY focused on the data storage, not UI or other aspects of time tracking more generally. See this comment in the general time tracking issue for more context: https://www.drupal.org/project/farm/issues/2402943#comment-13989330

4 Likes

You know me and my team is in Mike - down for the discussion when and if others are in!

3 Likes

@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!

2 Likes

Count me in!

2 Likes

@Botlfarm and @mstenta I completely agree with the time tracking feature for animals. Here are a couple other applications to such a tool:

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

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

3 Likes

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.

I think farmOS could be a great tool for this.

2 Likes

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 :slight_smile:

3 Likes

Yea! Can’t wait to put Paul’s time quantities to the test in mobile.

3 Likes

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!

2 Likes

I am also looking forward to the data model parts of this change for use in Asset Link!

2 Likes

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.