dstask
dstask copied to clipboard
Modifying resolved tasks
Hey!
First of all, thanks for a great task-manager!
I have a question. Is it possible to edit already resolved tasks? I.e., for instance to add notes pertaining to the resolution of the task.
Running dstask show-resolved shows the list of resolved tasks, but I can't seem to find an ID I can reference in a call to dstask modify. Is this something I have just missed, or does this feature not exist?
Cheers in advance!
Hi!
First of all, thanks for a great task-manager!
You're welcome, I'm glad you like it!
Is it possible to edit already resolved tasks?
Not currently via cli, I've been meaning to allow manipulation of resolved tasks.
Resolved tasks no longer have a numeric ID, but still retain a UUID which remains the same throughout the lifetime of the task. I think the way I will do it is allow addressing of resolved task by their UUID, which would be listed in show-resolved.
I can make it such that you don't have to use the entire UUID, just enough to disambiguate. For instance, the resolved task with UUID 2cb8aa23-4d02-4ab8-8665-b154ed4a30ee could be edited with dstask edit 2cb8aa or something. dstask could ask for more characters if that matches more than one task. show-resolved could list the first 6 by default where possible.
Does this sound like a good solution?
Hi again!
UUID sounds very reasonable. This is what git uses as well, no?
What are the chances of two UUIDs matching?
You'll have to be veeeeeeeery lucky for that to happen, @qTipTip !
For example, the number of random version-4 UUIDs which need to be generated in order to have a 50% probability of at least one collision is 2.71 quintillion .. This number is equivalent to generating 1 billion UUIDs per second for about 85 years.
ref https://en.wikipedia.org/wiki/Universally_unique_identifier#Collisions
UUID sounds very reasonable. This is what git uses as well, no?
Git uses a merkel tree using sha1 hashing. dstask uses UUID4s already for a globally unique task ID. As @stianlagstad says, collisions are.... improbable :)
@stianlagstad -- thanks for posting an article on dstask, by the way. I enjoyed reading it.
@naggie I can volunteer to update dstask to show uuid with the show-resolved command if this isn't already being worked on
EDIT: I figure a good reference point would be to look at how taskwarrior implements it, since they are very similar in nature
Just as a note, truncated UUIDs have a way higher probability of colliding due to their structure. It has a random component in there, but some of them are deterministic, e.g. some parts come from the time the UUID was generated.
Actually that's a good point. Not sure it will affect us much in practice though, it may result in an an extra disambiguation step now and then which is fine.
@naggie I can volunteer to update dstask to show uuid with the show-resolved command if this isn't already being worked on
Thanks though @ard0gg is on the case with https://github.com/naggie/dstask/pull/37 . Please take a look and provide your thoughts if you have time.