Skip to content

New support for subtasks#594

Open
powerjungle wants to merge 9 commits intopimutils:mainfrom
powerjungle:powerjungle/subtasks
Open

New support for subtasks#594
powerjungle wants to merge 9 commits intopimutils:mainfrom
powerjungle:powerjungle/subtasks

Conversation

@powerjungle
Copy link
Copy Markdown

@powerjungle powerjungle commented Sep 8, 2025

Add support for RELATED-TO property and RELTYPE parameter.

Taken from RFC 5545, section 3.8.4.5. If present in a file, these values are now read and stored in the cache.

Tests are modified to reflect the change.

The SCHEMA_VERSION is incremented to allow the cache to be recreated after the update.

Nothing is required from the user to be done for the changes in this PR to work.

Before:
image

After:
image

Closes: #396

@balejk
Copy link
Copy Markdown
Contributor

balejk commented Oct 1, 2025

If by cache you mean the cache database, it should be enough to just increment the schema version to force a rebuild.

Taken from RFC 5545, section `3.8.4.5`. If present in a file,
these values are now read and stored in the cache. Nothing in the UI
has been changed. Tests are modified to reflect the change.

Increment `SCHEMA_VERSION` to allow cache recreation on todoman update.
New names and values added to the JSON output for the `RELATED-TO`
property.
List text output is now with a tree structure:
task 1
    task 2
    task 3
        task 4
task 5

The table list is changed to a dictionary representing a tree.
No changes to the SQL queries are made.

RELTYPEs PARENT, CHILD and SIBLING are supported.
https://www.rfc-editor.org/rfc/rfc5545#section-3.2.15

Includes output space formatting fixes.

Tests adjusted to changes.
Comment for describing the weird code for merging arguments.
Using the newly supported attributes, two new options are added.
`--subtask-for`, making a task be a subtask for another and
`--not-subtask`, making a task no longer be a subtask.
The commands `new` and `edit` are fitted with these new options.
@powerjungle powerjungle force-pushed the powerjungle/subtasks branch from e87552a to b6ee7fa Compare October 1, 2025 14:50
@powerjungle
Copy link
Copy Markdown
Author

powerjungle commented Oct 1, 2025

If by cache you mean the cache database, it should be enough to just increment the schema version to force a rebuild.

Ah thank you, I totally missed it! I rebased my changes to make use of this and to describe it properly in comments and in the documentation. I edited the first comment of the PR to remove the "breaking changes" part since it's not true anymore.

@jlkDE
Copy link
Copy Markdown

jlkDE commented Apr 10, 2026

Hey, I just rebased this to the current main for myself and as far as I can see everything works as intended, thanks for that!
What is needed for this to progress, is there some way to support this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show subtasks in a better way

3 participants