ad-si / TaskLite

The CLI task manager for power users
https://tasklite.org
GNU Affero General Public License v3.0
216 stars 12 forks source link

Importing recurring task templates from taskwarrior #27

Open Profpatsch opened 3 years ago

Profpatsch commented 3 years ago

Probably more of a feature request, but I had quite a bit of recurring tasks in my taskwarrior db, yet after the import (via tasklite import task.json as described in the manual), they are all imported like single (long overdue) tasks.

I guess it would require a special knowledge of taskwarrior’s data model to have a best-effort mapping of the supported recurrence features.

ad-si commented 3 years ago

Mh, yeah sounds definitely annoying, but this will probably be a quite difficult undertaking. Have you checked if there is a way to export the taskwarrior tasks in a way that only the most recent incarnation of a recurring task is exported? I guess this would make the import already much cleaner.

gour commented 3 years ago

When importing tasks from taskwarrior, I got many of:

tasklite: SQLite3 returned ErrorConstraint while attempting to perform step: UNIQUE constraint failed: task_to_note.ulid

Don't know if it is due to recurring tasks which I have many or something else, non-related?

ad-si commented 3 years ago

Oh, good catch (I think)! This error means that you try to import 2 identical notes. While this error makes sense for tasks (you wouldn't want to import 2 absolutely identical tasks) I guess it doesn't make much sense for notes, which can be identically but for different tasks. Opened an issue for this: https://github.com/ad-si/TaskLite/issues/36

ad-si commented 3 years ago

Or maybe it's a general bug for importing several notes for the same task. Will have to investigate. Do you have a minimal example?

gour commented 3 years ago

Or maybe it's a general bug for importing several notes for the same task. Will have to investigate. Do you have a minimal example?

IIRC, none of the tw tasks have more than single task, but will try to produce minimal example, if possible...