todoman icon indicating copy to clipboard operation
todoman copied to clipboard

Show subtasks in a better way

Open tbm opened this issue 4 years ago • 5 comments

It would be great if subtasks would be grouped within their task, e.g. by intending the description or something.

subtasks = use RELATED-TO

tbm avatar Jun 06 '20 06:06 tbm

Sounds reasonable. :+1:

I won't have time myself to address this, but further discussion around it or PRs are welcome.

WhyNotHugo avatar Jun 08 '20 10:06 WhyNotHugo

Because the Subtasks thing, it seems like the related to field is not stored at the moment? If not where is it, if yes how can I access it ^^ (interested in solving this issue)

JBenda avatar Mar 07 '21 20:03 JBenda

~The field is not read or used at all right now; so a first step would likely be adding support to the models to it. models.py is the starting place for that.~

~Once models actually have this field, I guess the Todo class can have a related() method that returns related Todos. This would likely have to be resolved when loading from the cache or by the List class.~

Never mind, related is used right now, though for recurring tasks. Back to the thinkboard.

WhyNotHugo avatar Mar 08 '21 08:03 WhyNotHugo

Oh, unlucky https://github.com/JBenda/todoman/tree/feature/hierarchySupport, there are some thoughts of implementing hierarchy in the cache with nested sets, but it's kind of hard to correctly implement the cache_update, because everything just removes the items, which you can't easily with a hierarchy, because then it will break. So we maybe need to introduce the concept of file update instead of delete insert.

That I implemented a new parent field is then bad luck ^^

JBenda avatar Mar 09 '21 21:03 JBenda

The RELATED-TO field can have a RELTYPE attribute, which can be PARENT, CHILD, SIBLING or an X- value.

Having subtasks defined with RELTYPE=PARENT and/or RELTYPE=CHILD sounds very reasonable.

In the absence of a RELTYPE, I would rather not treat them as subtasks, since it may be some other kind of relationship.

For recurrent items, I believe using SIBLING might make sense, but might be best to use something like RELTYPE=X-RECURRENCE-OF=XZY.

WhyNotHugo avatar Apr 28 '22 11:04 WhyNotHugo