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

[TW-1953] Recurring tasks spawned incorrectly #1963

Open
taskwarrior opened this issue Feb 14, 2018 · 10 comments
Open

[TW-1953] Recurring tasks spawned incorrectly #1963

taskwarrior opened this issue Feb 14, 2018 · 10 comments
Labels
type:bug Something isn't working
Milestone

Comments

@taskwarrior
Copy link

Jan Stolarek on 2018-02-03T17:25:04Z says:

I have a bunch of tasks that I want to recur on a monthly basis. On the 2nd December I created two such tasks:

`$ task add "Create backup" recur:1month due:3d
Created task 13 (recurrence template).

$ task add "Pay the bills" recur:1month due:3d
Created task 13 (recurrence template).`

Now on the 3rd December I completed one of them:

3nd December:

$ task 16 done Completed task 16 'Create backup'. Completed 1 task.

On the 6th December new instances of each task have been spawned:

`$ task

ID P Due Time Description
17 M 5-12-2017 22h Pay the bills
19 M 4-01-2018 Create backup
20 M 4-01-2018 Pay the bills`

There is now one instance of "Create backup" and two instances of "Pay the bills". New instances will be due in a month so I put them on a waiting list:

`$ task 19-20 mod wait:eom

Modifying task 19 'Create backup'.
Modifying task 20 'Pay the bills'.
Modifying recurring task 17 'Pay the bills'.
Warning: You have specified that the 'wait' date is after the 'due' date.`

At some point I also mark task 17 as done. I admit I have not precisely reporduced my every usage of task during the month of December but on the 6th of January I realized I have the following waiting tasks:

`$ task waiting

ID P Project Wait Remaining Due Description
14 M 30-01-2018 3w 30-01-2018 Create backup
15 M 30-01-2018 3w 30-01-2018 Pay the bills
25 M 1-03-2018 7w 3-02-2018 Create backup
27 M 1-03-2018 7w 3-02-2018 Pay the bills`

Notice two bogus instances with wait times set to March and due dates for February. I have marked those two tasks as done on 31st January and also marked tasks 14 and 15 as done. On the 31st January I already had new instances of my recurring tasks spawned:

`$ task waiting

ID P Project Wait Remaining Due Description
14 M 28-02-2018 3w 28-02-2018 Create backup
15 M 28-02-2018 3w 28-02-2018 Pay the bills`

On the 3rd another instances were spawned:

`$ task waiting

ID P Project Wait Remaining Due Description
14 M 28-02-2018 3w 28-02-2018 Create backup
15 M 28-02-2018 3w 28-02-2018 Pay the bills
25 M 1-04-2018 3w 5-03-2018 Create backup
26 M 1-04-2018 3w 5-03-2018 Pay the bills`

Notice the nonsense wait and due dates for new tasks.

This problem did not happen with older versions of Taskwarrior. I don't remember whether this started happening when I switched from 1.9 to 2.0 or from 2.0 to 2.5, but the fact is that something goes wrong with spawning recurring tasks and every few months I just have to delete all of them and create them anew because they become such a mess. Ot seems like there are two copies of the same task being spawned and something bad is happening with "due" dates ("wait" dates as well?). Sorry, I know this is a bit vague but this is the best description I can provide for the moment.

@taskwarrior taskwarrior added this to the Backlog milestone Feb 14, 2018
@taskwarrior taskwarrior added the type:bug Something isn't working label Feb 14, 2018
@taskwarrior
Copy link
Author

Migrated metadata:

Created: 2018-02-03T17:25:04Z
Modified: 2018-02-03T17:25:04Z

@jstolarek
Copy link

I just noticed something that might explain the source of the bug. It seems that new recurring tasks are spawned both from the recurence templates AND from currently existing instances of recurring tasks. Here's why. As usual, I had my recurring tasks spawned a few days ago:

$ task

ID P Project Due        Time Description
10 M         28-03-2018      Create backup
11 M         28-03-2018      Pay the bills

There were no waiting instances of recurring tasks in the waiting lists at this points. I have paid the bills, but since I am lazy I didn't do my backups, so the task went overdue:

$ task

ID P Project Due        Time Description
10 M   m     28-03-2018   3d Create backup

But when I checked the waiting list today I realized that two copies of "Create backup" task have been spawned but only one copy of "Pay the bills":

$ task waiting

ID P Project Wait       Remaining Due        Description
16 M         28-04-2018        3w 28-04-2018 Create backup
19 M         28-04-2018        3w 28-04-2018 Pay the bills
20 M         28-04-2018        3w 28-04-2018 Create backup

So it seems that one additional "Create backup" task was spawned from the not yet finished instance for this month. This is clearly wrong - tasks should be spawned only from templates.

@devurandom
Copy link

Is this a duplicate of #1649 (which itself is a mirror of GothenburgBitFactory/taskserver#46)?

@jstolarek
Copy link

I'm not sure. Other similar bug reports seem to involve syncing. I am only using a local client and not syncing with any remote server.

@rudolfschmidt
Copy link

I get the same problem. It has nothing to do with sync. Forget that completely.

@madduck
Copy link
Sponsor

madduck commented Nov 17, 2019

I get the same problem. It has nothing to do with sync. Forget that completely.

I think it has everything to do with sync, or can you confirm that it happens to you in a single-system setup without sync?

@rudolfschmidt
Copy link

Exactly that is what I mentioned

@jstolarek
Copy link

I think it has everything to do with sync

Not in my setup - I don't use syncing.

@madduck
Copy link
Sponsor

madduck commented Nov 17, 2019

Alright, I rest my case then. Sorry, @rudolfschmidt, but it was not clear from your message whether you were not using sync, or simply of the opinion that it has nothing to do with it.

@rudolfschmidt
Copy link

no worries, everything ok!

@tbabej tbabej removed the recurrence label Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Recurrence overhaul
Awaiting triage
Development

No branches or pull requests

7 participants