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

Editing a task's worktime after it has been recorded #49

Open
smithbm2316 opened this issue Jan 14, 2021 · 8 comments
Open

Editing a task's worktime after it has been recorded #49

smithbm2316 opened this issue Jan 14, 2021 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@smithbm2316
Copy link

Hey! Stumbled upon this project when I was trying to get taskwarrior/timewarrior setup for myself, and this seems to be much more along the lines of what I was looking for in the process. Nice and simple! Great work on this project thus far, it's really easy and intuitive to use 😄. I was wondering if there is any way to edit a task's worktime other than going into the store file and manually editing the UTC dates. While I was able to do that for a task that I had forgotten to track, it was a bit annoying as I had to convert from UTC time to my timezone before editing the entries in the store file. Would love if there was a way to do this via the cli interface or suggestions about how I might go about doing that in an easier fashion if that is not possible right now. Thank you!

@soywod
Copy link
Owner

soywod commented Jan 14, 2021

It's a nice idea you propose there. I'm using myself the tool at work for a year now, and the situation of "oops, I forgot to start the task" happens time to time. And when it does, I should admit that editing the store followed by a unfog cache:clear to clear the state cache is not the sexiest way of fixing the issue.

Here the rules I have in mind:

  1. The store should remain untouched as much as possible. So a new command needs to be introduced.
  2. When I forget to start a task, I ask myself "when did I start to work on this task? 30 min ago?", so I think the simpliest way is to use this time notation 30min, 2h, 3d to update the worktime.

So what about a command unfog worktime add <TIME> where TIME sth like 30min, 2h, 3d etc?

@soywod soywod self-assigned this Jan 14, 2021
@soywod soywod added the enhancement New feature or request label Jan 14, 2021
@smithbm2316
Copy link
Author

smithbm2316 commented Jan 14, 2021

So what about a command unfog worktime add <TIME> where TIME sth like 30min, 2h, 3d etc?

This seems like an elegant solution to me! Would that syntax include the ability to choose a specific task to update the worktime for? Perhaps something like this could be used for allowing the addition and editing of a task easily, a new command called "time":

unfog time <TASKID> add <TIME>
unfog time <TASKID> --start <START ISO DATETIME> --end <END ISO DATETIME>

The second command would be attempting to add a completely past entry of time for a task, if that was not clear. Perhaps if you completed a task earlier in the day that you wanted to log time for, but were away from your computer or just did the task before adding it to unfog, this might be a nice way to retroactively add time to a task.

Regardless, I think your proposal is definitely a big improvement! Thanks for the quick response! If there's any way I can help you with this feature, whether it be testing it, documenting it, or just offering my opinion, please let me know! I'm unfortunately not familiar with Haskell so I probably wouldn't be able to write the code for it myself, at least not quickly. I could perhaps look into adding some functionality to the unfog.vim plugin though in the future to help incorporate this idea.

@soywod
Copy link
Owner

soywod commented Jan 14, 2021

I'm not so fan of time (it sounds too generic for me), but I like the concept. I let you know!

@soywod
Copy link
Owner

soywod commented Jan 19, 2021

I reconsider the thing. Theoretically your proposition makes sense. But practically I'm afraid it does not fit the need. Here my 2 thoughts:

  1. The fact to fix the worktime by giving an amount of time is not "concise" enough. I would still prefer to open the store and edit the date manually. I got a good example yesterday, when I forgot to stop a task before going to bed. I did not want to calculate and put an amount of time, instead I would prefer to put yesterday at 10:00.
  2. Sometimes you also mistake the status of a task (done, deleted), or you also want to rename a project's name. Introduce a new command for all future use cases does not make sense.

What do you think about a "store editor"? It could be a CLI, a TUI or even a GUI that allows user to edit the store in a more user-friendly approach. The amount of work is huge compare to the real benefits, but it can be a good occasion to learn sth new. Plus it covers all future issues related to store manipulations.

@smithbm2316
Copy link
Author

smithbm2316 commented Jan 21, 2021

A TUI editor I think would be an interesting option! I think my biggest pain point was simply having to open the store and then do the calculations for what time I started/ended the task. It seemed that the time zone was in UTC/GMT by default in the store, where my time zone is 8 hours different from that. I don't really mind editing the store manually all that much, what I didn't like is having to calculate in my head the time difference before I can even edit the entries in the store.

I'm all for a TUI interface if that's something you're interested in!

@soywod
Copy link
Owner

soywod commented Feb 28, 2021

I still have in mind a TUI to edit the store but I lack of time these days. I will try to add new events to increment/decrement the worktime next week, I let you know!

@smithbm2316
Copy link
Author

smithbm2316 commented Mar 1, 2021

I still have in mind a TUI to edit the store but I lack of time these days. I will try to add new events to increment/decrement the worktime next week, I let you know!

Oh, I had forgotten I had even opened this issue a while ago. I am happy to close it if you would like, it is not something that really is bothering me much anymore. I don't want you to be working on a feature you don't have time for just for my sake, your tool is quite great as it is already! I have personally moved on to working on another open-source project myself in my spare time, so I unfortunately don't have the time to help with a TUI editor, nor do I know haskell well enough to help contribute to this project unfortunately.

@soywod
Copy link
Owner

soywod commented Mar 1, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants