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

supporting tasks.org: existing recurring tasks #6

Open
capocasa opened this issue May 15, 2024 · 4 comments
Open

supporting tasks.org: existing recurring tasks #6

capocasa opened this issue May 15, 2024 · 4 comments

Comments

@capocasa
Copy link
Contributor

capocasa commented May 15, 2024

Trying to use icstask with open source tasks.org android app via davx5, and see if I can patch it a bit to get it to work. (tasks.org is sooooooo good)

I currently cannot update fields like 'description' on recurring tasks using tasks.org app.

example:

Input

{"description":"my task description","due":"20240731T220000Z","entry":"20240515T092213Z","modified":"20240515T090501Z","status":"pending","uuid":"a964698f-43f3-4690-b807-76eac2943990"}

Python Error

subprocess.CalledProcessError: Command '['task', 'rc.verbose=nothing', 'rc.recurrence.confirmation=no', 'rc.data.location=/path/to/my/todo.task', 'import', '-']' returned non-zero exit status 2

Taskwarrior error

You cannot remove the recurrence from a recurring task.

The difference seems to be: tasks.org assumes that the fields sent via caldav will update the fields of the target task in storage, while taskwarrior import command seems to assume incoming fields for the target task are to replace all fields but not change recurrence status.

Scratching my head. If you have any ideas on how to best fix this behavior it would be most appreciated. I thought of exporting the task, merging the json in python, and then importing, but it might be overly complicated or create undesired behavior.

@jspricke
Copy link
Owner

Recurring tasks in taskwarrior are (where?) internally represented by two tasks, one is something like a template and the other the current instance. I gave up on recurring tasks so support for them is rather limited in icstask. I think taskwarrior upstream changed that model in version 3.0 but I did not look into it yet. It may make sense to look at it before trying to solve this.

@capocasa
Copy link
Contributor Author

Tried with taskwarrior 3, same behavior. It seems the command line interface has indeed not changed in this respect between taskwarrior major versions 2 and 3, as promised by taskwarrior documentation.

I have requested a comment from taskwarrior at GothenburgBitFactory/taskwarrior#3458, we will see if a member of the taskwarrior community might be willing to help.

I am inclined to believe that this behavior is an accident, and we could safely treat this as a limitation of task import and work around it.

@capocasa
Copy link
Contributor Author

capocasa commented May 18, 2024

@GothenburgBitFactory kindly weighed in and says import behavior is deliberately designed as a record replace tool, suggesting to use either task mod or task export before task import for editing.

I think I'll create a patch to safely use task mod to let task do the heavy lifting and test it on my setup. What do you think?

@jspricke
Copy link
Owner

I don't know anymore why I chose task import, task mod sounds good to me.

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

No branches or pull requests

2 participants