TailorDev / Watson

:watch: A wonderful CLI to track your time!
http://tailordev.github.io/Watson/
MIT License
2.41k stars 236 forks source link

Get balance compared to nominal hours #249

Open KennethNielsen opened 5 years ago

KennethNielsen commented 5 years ago

Hallo Watson devs

I use watson to track hours at work to keep track of what I work on and how much. I'm not payed by the hour or for overtime, but I still like to keep track of how much I work compared to the nominal number of hours I'm supposed to work.

For this purpose, really what I need is to know the balance i.e. how many hours have I worked in total (within a timespan say 1 month) compared to the nominal hours, which are calculated as nominal hours per day times the work days in the time span.

Does such a feature exist, and if not, would you be interested in it?

jmaupetit commented 5 years ago

This feature has already been discussed if I remember well. IMO the main painful point would be to make it optional and easily configurable. Do you have ideas about the configuration of this feature?

KennethNielsen commented 5 years ago

Yes. In my mind this has to be a separate sub command (say "balance"). I know that you probably want to add those sparsely, but I think that it is very important here because:

With regards to configuration, which was you real question, what I would do is just 2 new configuration keys:

  1. One for the nominal number of hours per weekday
  2. One for which weekdays in the week are workdays

Then the calculation of total nominal worktime is just the sum of nominal hours per workday in the period.

The one outstanding issue is holidays, vacation etc. What I would do for that it to simply say, that if you want to use this feature, then you have to log those in as activities on those days with nominal hours and then the calculation will be correct i.e. if I'm sick I log sickness at 7,9 hours on that day in project "absence". It will mean, that you will need to disregard your absence project (whatever you call it) when you look at reports etc. But if you do use Watson for my purpose, then you're probably ok with that. I used to do that at my old work when I used Hamster as well.

(Sorry about the mid edit update of the comment :))

simonachmueller commented 4 years ago

This would be a great feature, currently I'm doing that beside of the Watson just in an Excel sheet week per week.

KennethNielsen commented 4 years ago

Just a littkle status update here. I'm still planning to work on this and I think I have a good plan for it, but right now it is kind of waiting for #277 since I prefer not to have many open side projects.

KennethNielsen commented 4 years ago

@semenmiroshnichenko BTW. Since I find Excel extremely painful I should point out that since most of Watsons commands can output JSON, you can Python script your way out of this, which in my mind is more comfortable. I created a gist for my quick and dirty script for the job (https://gist.github.com/KennethNielsen/175923fb868ae02ad8cc2311626a3515), in case anyone is interested.

But I would still like Watson to do it.

varac commented 1 year ago

Related historic issue/PR: