Skip to content

Allow more fine-grained "enough" alarms. #1

@bartekbrak

Description

@bartekbrak

Currently kinro notices when you've worked enough in the current month. It counts all the days in a given month, sums their work_ends - work_starts deltas and compares to the sum of TimeSpans of this month, taking overlaps into account.

This is fine for finding out the key metric - have I worked enough for the current moment in time. But we can do more. I'd like to be able to define a long running task, like 'Learn Portuguese', and set a daily goal for it, let's say thirty minutes a day. I want to be able to define multiple such goals. Ideally, I would be able to easily set such goals from a previous day.

Later on, as a bonus, this new function can also become a partial alert, so having XX% of the task could trigger an event. So that I can start rushing when some bucket burned through most of allocated time (and I'm still not on the right track).

The proposed solution is to:

  • Get rid of Client and make Buckets a tree structure using M2M relations.
  • Remove Day.work_starts and Day.work_ends and define a new model Alert - this makes the Day model conceptually obsolete, worked isn't used.
  • Tree structure makes calculating Bucket deltas more difficult and time consuming, consider some form of cache (stored on Bucket)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions