Feature Request: Durations for tasks/chores/meal_plan items
Previous issues
This would be re-opening issue #1689. I'd like to propose this gets built into Grocy, instead of just being a userfield.
Rationale
For tools such as calendars consuming things such as Meal Plans, Chores, Tasks, it'd be nice if the duration of such tasks could be consumed. This could then populate a duration field on the ical feed, which can block off time for things to be completed.
I am working on adding calendar support for home assistant's grocy custom component, which will require both start/stop times. Which for now, I will just assume a 1-hour duration for all items. (This isn't ideal)
While this could be resolved by a userfield, I fear consistency issues with multiple users.
Implementation Requirements
This could just be an optional field in Grocy on things that take time to complete (meal_plan, chores, tasks).
If not specified, then return null. (Leave it to the consumer to guess)
For rendering, the duration should probably just be a field in the HH:mm:ss format, which will be converted into a timerange, which would be stored in the DB as an amount of seconds.
Further notes
I am willing to help implement this feature, but need some help on the desired direction. Otherwise, I'd probably go with:
- Add a duration field to the database, being a nullable unsigned integer
- Add an optional HH:mm:ss field to the pages for creating/editing meal_plans, chores and tasks (This is where I'll probably struggle)
Source: grocy/grocy