TailorDev / Watson

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

watson interrupt (feature request) #470

Open psawa opened 2 years ago

psawa commented 2 years ago

Let's say I am working on project A from 09:00, and suddenly at 09:30 I receive an unexpected phone call about project B. The phone call lasts until 09:50, and then I resume my work on project A.

Typically after the call at 09:50, I would correct my time tracking by doing something like:

watson stop --at 09:30
watson start --at 09:30 projectB
watson stop 
watson start projectA

My feature request is to add a new command, watson interrupt, that would behave like this:

watson interrupt projectB --at 09:30
> Added projectB from 09:30 to now. Restarting projectA.
jmaupetit commented 2 years ago

That's interesting, thanks!

EdgyEdgemond commented 1 year ago

With a recent merge, you should be able to do in a future release.

watson start --at 09:30 projectB
watson start projectA

Would be simple enough to replicate those steps for interrupt using ctx.invoke(), if i'm not mistaken @jmaupetit

EdgyEdgemond commented 1 year ago
$ watson start projectA --at "16:07" 
Starting project projectA at 16:07

$ watson interrupt projectB --at "16:10"
Stopping project projectA, started 15 minutes ago and stopped 12 minutes ago. (id: de3a47f)
Starting project projectA at 15:22
Friday 15 July 2022 (15m 33s)
        de3a47f  16:07 to 16:10      03m 00s  projectA
        7048e60  16:10 to 16:22      12m 33s  projectB
        current  16:22 to 16:23      01m 25s  projectA
psawa commented 1 year ago

Thank you @EdgyEdgemond, I'm looking forward to see it in the next release.

psawa commented 1 year ago

Do you have visibility on when the next release will come out?