How to do "wait" with Vikunja

Hi, I’m considering moving from taskwarrior to vikunja.

One of taskwarrior’s features that I use a lot is the “wait” property of a task (see also their docs). That’s a date that you can assign to a task, which basically suspends the task until that date has passed, excluding it from most listings. This really helps me to focus on current tasks and not get distracted by future tasks that I cannot yet work on anyway.

Does vikunja offer anything similar, or does it have a different way to achieve the same goal, of being able to view only tasks that can be worked on today? There’s the “start_date” property, but if I understand correctly that denotes when you actually start work on the task.

1 Like

Hey! You can filter tasks with start dates between a range, by default its a 1 week period, but is easily changed with dropdown tasks.

Hope this helps!

This probably depends on when you define a task to be “workable”. You could create a filter like @distro proposed to only show tasks due in the current week (or the next seven days, or this month, or …). If that’s all you need and if its the same period for every task I’d use this.
Another way could be to use the start and end dates and set them to roughly the period where you want to work on the task. Then you could use a filter again to hide tasks which are not due to work on yet.

Thanks for your suggestions! I can’t seem to find a strategy that works though.

Using just the “due” date and using filters doesn’t suffice, because tasks have varying “wait times”, or equivalently, varying time windows in which they must be done. I.e., some tasks can be started on only a few days before their due date, for others that can be a month or longer. I cannot capture that in a single filter to show workable tasks.

So we really need a second date field besides “due” for this, and “start” indeed seems to come closest. However, many of my tasks that have a “wait” are also repeating, and the way “start” and “repeating” interact does not play nice: when you mark a repeating task as done in Vikunja, the start and due dates are both set to the same date in the future. For this scheme to work, Vikunja would need to preserve the time window between start date and due date – or at least allow you to specify how the start date is increased.

I guess I could use the API with a cron job to create these repeating tasks with the right dates set, but that seems overkill, especially coming from taskwarrior where this works well by default.

That sounds like a bug. All the repeat functionality does is increase all dates by the repeating amount. Can you check if this is also broken on try (that’s running the latest develop code)?

I tried some more combinations, and found that that possibly buggy behaviour happens only when the repeat mode is set to “From current date”. In that case, both start date and due date are set to “current date + repeat interval”. (Interestingly, the end date is not set to that same date.) I would still say that the way that that start date is set is a bug.

I would expect that in case of “From current date” repeat mode, the new due date is set as now (so current date + repeat interval), but the start date is shifted by the same amount as the due date, so that the difference between start and due is the same before and after the marking as done. I’m not sure if this is what everyone would expect, but I asked someone over here (admittedly also a taskwarrior user) and they independently came up with this description.

That’s definitely a bug. Thanks for reporting it, will investigate and push a fix.

Hi, thanks. I can’t find an issue or merge request for this yet. Assuming that this isn’t fixed yet, would you like me to try to fix this?

Looks like it’s all in setTaskDatesFromCurrentDateRepeat (pkg/models/tasks.go). There is already code in there to check for the case where both start and end date are set; I would add some more cases that also compare to the due date.

It’s not yet fixed, feel free to send a pr.

Done: fix: preserve dates for repeating tasks by ariep · Pull Request #47 · go-vikunja/api · GitHub

Merged :tada: Thanks for your effort.

1 Like