Skip to content
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

Remove tasksDoneToday collection #2103

Open
tijlleenders opened this issue Jan 12, 2025 · 0 comments
Open

Remove tasksDoneToday collection #2103

tijlleenders opened this issue Jan 12, 2025 · 0 comments
Labels

Comments

@tijlleenders
Copy link
Owner

tijlleenders commented Jan 12, 2025

Is your feature request related to a problem? Please describe.
In #1407 we implemented tasksHistory and tasksDoneToday collections, but the information from tasksDoneToday can also be queried from taskHistory - so it is actually not needed.

Describe the solution you'd like
Remove the tasksDoneToday collection - and send the required data for the scheduler from taskHistory:

For each goal that is sent to scheduler, filter/aggregate it down to:

  • total_time_completed
  • time_completed_in_last_7_days
  • time_completed_today
  • time_completed_in_future
    so that this can be taken into account by the scheduler.

Add these fields to the goal being sent to the scheduler.

Describe alternatives you've considered
Reducing the number of hours of the goal.
A. This is not correct. The goal represents the ambition, not the realization.
B. An option could be to include it as attribute(s) of the Goal (i.e. realizedHours). Keeping that accurate could get messy, due to the sliding window - so querying the tasksHistory table directly at schedule query time dynamically is simpler, without the indirection of the Goals collection.

Additional context
None.

@tijlleenders tijlleenders moved this to temp to drag faster in ZinZen® Jan 12, 2025
@tijlleenders tijlleenders moved this from temp to drag faster to Parking lot in ZinZen® Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Parking lot
Development

No branches or pull requests

1 participant