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-1625] recurring tasks appear multiple times #1649

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

[TW-1625] recurring tasks appear multiple times #1649

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

Comments

@taskwarrior
Copy link

Johannes Wienke on 2015-06-18T11:51:32Z says:

Once in a while I end up with the situation that I have multiple occurrences of recurring tasks for the same day.

46 4d    home      nas               P7D     2 days backup NAS                                                                9.51
39 3d    home      nas               P7D     2 days backup NAS                                                                9.51
45 4d    server                      P7D     2 days update debian                                                             8.71
47 4d    home                        P7D     2 days Blumen gießen                                                             8.71
38 3d    server                      P7D     2 days update debian                                                             8.71
40 3d    home                        P7D     2 days Blumen gießen                                                             8.71

I could not really track down what is causing this. My initial thought that mirakel is the origin was wrong, because this also appears without mirakel.

In any case, a fix for this would really be good since recovery always takes some time. I am using recurring tasks for many things so there are often affected tasks.

@taskwarrior taskwarrior added this to the 2.6.0 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: 2015-06-18T11:51:32Z
Modified: 2017-01-16T17:36:11Z

@taskwarrior
Copy link
Author

Tomas Babej on 2015-06-19T21:01:56Z says:

Thanks for reporting!

However, I am not able to reproduce this, so I doubt this is a generic error. We will need some more information as to how to reproduce the issue. Please let us know if you were able to track down the problem.

You might be interested in reading more about reccurences, check our docs on taskwarrior.org for that.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-06-19T21:04:33Z says:

Tracking this down will probably be a real issue since I have no idea what is causing this. In case I end up in that situation again, I could send you my data files. Maybe this might help to find out what is going on?

@taskwarrior
Copy link
Author

Tomas Babej on 2015-06-20T13:22:31Z says:

First let's investigate the offending tasks - can you share the output of the 'info' command for the duplicate tasks? E.g.:

$ task 39,46 info 

Attributes like mask index, or creation date might tell us more.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-06-21T17:28:32Z says:

Unfortunately, I don't have the state available from that time anymore since I resolved the issues manually to get back to work. Once I end up in a similar situation again, I will post the required information here.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-06-23T19:38:47Z says:

Ok, back in the same situation. Here are the info ouputs:

> task 40,46 info

Name          Value
ID            40
Description   backup NAS
Status        Pending
Project       home
Recurrence    weekly
Parent task   567eb98f-db4a-46be-b182-7833c5b45052
Mask Index    2
Entered       2015-06-21 14:08:27 (2 days)
Due           2015-06-28 00:00:00
Last modified 2015-06-18 14:02:52 (5 days)
Tags          nas
Virtual tags  CHILD DUE MONTH PENDING READY TAGGED UNBLOCKED YEAR
UUID          16f321aa-4760-4230-9bcf-3c3ef037ac4b
Urgency       8.739

    project      1 *    1 =      1
    tags       0.8 *    1 =    0.8
    due      0.577 *   12 =   6.93
    age      0.005 *    2 =  0.011
* -----
                             8.739


Name          Value
ID            46
Description   backup NAS
Status        Pending
Project       home
Recurrence    weekly
Parent task   567eb98f-db4a-46be-b182-7833c5b45052
Mask Index    2.000000
Entered       2015-06-21 07:00:01 (2 days)
Due           2015-06-28 00:00:00
Last modified 2015-06-18 14:02:52 (5 days)
Tags          nas
Virtual tags  CHILD DUE MONTH PENDING READY TAGGED UNBLOCKED YEAR
UUID          910b7b35-f9e6-4360-9271-437ad257377b
Urgency       8.739

    project      1 *    1 =      1
    tags       0.8 *    1 =    0.8
    due      0.577 *   12 =   6.93
    age      0.005 *    2 =  0.011
* -----
                             8.739

@taskwarrior
Copy link
Author

Tomas Babej on 2015-06-24T13:25:05Z says:

Okay, so we can see that:

1.) both task have the same parent 567eb98f-db4a-46be-b182-7833c5b45052, which is good, since it means there are not two duplicate template tasks
2.) one task has mask index "2" and the other "2.000000". Mask index should be integer, which denotes the index of the recurrent child task (e.g. which generated task it is in order).

So the presence of 2.0000 is the culprit here I believe. Are you really sure that Mirakel is not causing this behaviour? I encountered some problems with Mirakel of this nature.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-06-24T13:39:21Z says:

Mirakel is not even installed anymore on my phone. It used to be connected to this account. Can this still be a relic?

@taskwarrior
Copy link
Author

Tomas Babej on 2015-06-25T16:37:02Z says:

Maybe.. the task recurs weekly.

How long since you removed the Mirakel app? Additionally, can we have a look at the parent task?

$ task 567eb98f-db4a-46be-b182-7833c5b45052 info

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-06-26T12:51:04Z says:

I am quite sure that I completely deleted the recurring task including all occurrences the last time I fixed this after deleting mirakel. And in any case, the instance of the recurring task with the offending mask has been created just recently without mirakel being installed anymore. Deinstallation of mirakel was several weeks ago.

languitar(at)milt ~> task 567eb98f-db4a-46be-b182-7833c5b45052 info

Name          Value                                      
ID            27
Description   backup NAS                                 
Status        Recurring
Project       home                                       
Recurrence    weekly
Mask          ++-                                        
Entered       2015-06-08 22:54:59 (2 weeks)
Due           2015-06-14 00:00:00                        
Last modified 2015-06-21 14:25:03 (5 days)
Tags          nas                                        
Virtual tags  MONTH OVERDUE PARENT TAGGED UNBLOCKED YEAR
UUID          567eb98f-db4a-46be-b182-7833c5b45052       
Urgency       13.89

    project      1 *    1 =      1
    tags       0.8 *    1 =    0.8
    due          1 *   12 =     12
    age      0.047 *    2 =  0.093
* -----
                             13.89

Date                Modification                     
2015-06-18 13:47:06 Mask set to '-'.
2015-06-18 13:47:06 Mask changed from '-' to '--'.   
2015-06-18 13:47:06 Mask changed from '--' to '+-'.
2015-06-18 13:47:06 No changes made.                 
2015-06-26 14:54:38 Mask changed from '+-' to '+X'.
2015-06-26 14:54:38 Mask changed from '+X' to '+X-'. 
2015-06-26 14:54:38 Mask changed from '+X-' to '+--'.
2015-06-26 14:54:38 Mask changed from '+--' to '++-'.
2015-06-26 14:54:38 No changes made.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-06-29T10:19:04Z says:

I just got another copy of the offending tasks. This time mask index was 3.0000. And I am quite sure that I did not see them yesterday on a different computer. So it might be related to syncing.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-06-29T10:43:50Z says:

Ok, another examination. All imask values in the *.data files are floating point numbers. Maybe this is really still a relic from mirakel. I tried to convert all of them to integers. However, these changes don't propagate to the task server. Therefore I tried to do a sync init, which fails with a lot of warnings about broken ancestors. So something must be completely messed up in my data.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-06-29T11:08:48Z says:

Ok, definitely a sync prblem as far as I can tell. I completely wiped everything on two clients and the task server. Afterwards I rebuilt all my tasks from scratch on one computer. All imasks are integers. I did a sync init and on the still empty computer a sync. The downloaded data contains all floating point numbers for imask values. imask values in the tx.data file on the server for this user are still integers, not float. So something must be breaking when downloading.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-07-05T15:23:08Z says:

No I am back at duplicated tasks, after a completely starting from scratch with the config files. Any way I can help to sort this out?

@taskwarrior
Copy link
Author

Paul Beckingham on 2015-07-07T15:06:30Z says:

Taskd bug. Taskserver 1.2 should resolve this, but right now has not.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-07-07T15:15:17Z says:

Does this mean there is also no fix in git master?

@taskwarrior
Copy link
Author

Paul Beckingham on 2015-07-07T20:23:34Z says:

That's right - this is not fixed yet.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-10-26T22:55:14Z says:

Any progress on this? I had a look at the server side and implemented a custom rule to treat imasks as integers. However, in the client the mask still ends up as a floating point number. So there is probably also an issue there.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-11-23T22:18:39Z says:

This patch adds a temporary workaround on the client side to interpret imasks always as integers.

@taskwarrior
Copy link
Author

Johannes Wienke on 2015-11-30T08:55:24Z says:

It seems this also doesn't help. I still see multiple instances of the same recurring task and all my clients are patched to have integer masks.

@taskwarrior
Copy link
Author

Johannes Wienke on 2016-01-08T07:33:28Z says:

Can someone please mark this as a duplicate of TD-44. This seems to be the origin or at least these issues should be related.

@taskwarrior
Copy link
Author

Paul Beckingham on 2016-04-09T14:56:31Z says:

See TD-44 for workaround.

@pbeckingham
Copy link
Member

@jcrben
Copy link
Member

jcrben commented Jun 16, 2018

[TD-44] - GothenburgBitFactory/taskserver#46

@devurandom
Copy link

Still an issue with taskwarrior 2.5.1 and taskd 1.1.0. I confirm that here the issue is also an integer / float mask index. I use task sync to synchronise two computers.

@rudolfschmidt
Copy link

I get also always problems with recurring tasks. Mostly it happens when I modify a spawned task that is a child from a recurring task and then he asks me to modify the parent too and then he creates new instances in a weird way.

@duckunix
Copy link

duckunix commented Dec 8, 2019

So, I spent some time trying to get to the point where I can duplicate this issue. I have a pending.data file which a) has been stripped of anything but the parent entries for 35 of my recurring tasks and b) have no personal details in them.

pending.data.without-child.txt

Using this pending.data file, I run task 2.5.1 once, and a mess of entries get created and listed as unwaited, then I run task again to see the results, and I have a mess of records which are duplicated.

Looking at them, I see that it is creating entries for last week, and this week. When running normally, I will get 2-4 entries for the same day:

13:08:50 ⌁ [don@eve:~] $ task info 325 332 342

Name          Value
ID            325
Description   Menu Plan
Status        Pending
Project       family
Recurrence    weekly
Parent task   84fcca7f-0010-42c0-bce4-3e700f0cb537
Mask Index    13.000000
Entered       2019-12-03 05:05:02 (5d)
Due           2019-12-09 21:00:00
Last modified 2019-12-01 08:51:06 (7d)
Tags          next home
Virtual tags  CHILD DUE MONTH PENDING READY TAGGED TOMORROW UDA UNBLOCKED WEEK YEAR PROJECT PRIORITY
UUID          33aa989f-9035-4833-911f-2653f96ae04a
Urgency       40.58
Priority      H

    project             1 *    1 =      1
    tags              0.9 *    1 =    0.9
    due             0.683 *   20 =   13.7
    age             0.014 *    2 =  0.027
    UDA priority.H      1 *    6 =      6
    UDA recur           1 *    4 =      4
    TAG next            1 *   15 =     15
                                   ------
                                    40.58



Name          Value
ID            332
Description   Menu Plan
Status        Pending
Project       family
Recurrence    weekly
Parent task   84fcca7f-0010-42c0-bce4-3e700f0cb537
Mask Index    13.000000
Entered       2019-12-03 14:26:14 (4d)
Due           2019-12-09 21:00:00
Last modified 2019-12-01 08:51:06 (7d)
Tags          next home
Virtual tags  CHILD DUE MONTH PENDING READY TAGGED TOMORROW UDA UNBLOCKED WEEK YEAR PROJECT PRIORITY
UUID          a528a583-7ae0-40b7-8b1d-3f650db87bf4
Urgency       40.58
Priority      H

    project             1 *    1 =      1
    tags              0.9 *    1 =    0.9
    due             0.683 *   20 =   13.7
    age             0.011 *    2 =  0.022
    UDA priority.H      1 *    6 =      6
    UDA recur           1 *    4 =      4
    TAG next            1 *   15 =     15
                                   ------
                                    40.58


Name          Value
ID            342
Description   Menu Plan
Status        Pending
Project       family
Recurrence    weekly
Parent task   84fcca7f-0010-42c0-bce4-3e700f0cb537
Mask Index    13.000000
Entered       2019-12-03 22:52:53 (4d)
Due           2019-12-09 21:00:00
Last modified 2019-11-24 08:15:49 (2w)
Tags          home next
Virtual tags  CHILD DUE MONTH PENDING READY TAGGED TOMORROW UDA UNBLOCKED WEEK YEAR PROJECT PRIORITY
UUID          65d95e1d-2677-4153-ad23-499357fa98de
Urgency       40.58
Priority      H

    project             1 *    1 =      1
    tags              0.9 *    1 =    0.9
    due             0.683 *   20 =   13.7
    age             0.011 *    2 =  0.022
    UDA priority.H      1 *    6 =      6
    UDA recur           1 *    4 =      4
    TAG next            1 *   15 =     15
                                   ------
                                    40.58

If needed, I can supply my .taskrc

@neumannjan
Copy link

+1, I had a daily recurrent task that I resolved every day for about a week. Then, I did task sync and got a ton of instances of these as overdue. I couldn't get rid of them, as upon consecutive task sync calls, they reappeared in large quantities. I had to delete the reoccurring task altogether.

@mgiugliano
Copy link

I am on TW 2.5.1 and also encounter this problem (with recurring tasks). I sync with http://inthe.am .

@debian-stormwatch
Copy link

Having the same here as well - I am also syncing to inthe.am. However the same happens with syncs to freecinc... Thanks for any help

@mgiugliano
Copy link

@debian-stormwatch I am testing TaskWarrior-Web and I am trying to see whether by explicitly deleting the double entries, they are reappearing. After an initial test, they did not.

@tbabej tbabej modified the milestones: 2.6.0, 3.0.0 Jun 7, 2021
@tbabej tbabej removed the recurrence label Oct 21, 2021
@portothree
Copy link

Same started to happen with me after a sync to the inthe.am service

@trev-dev
Copy link

trev-dev commented Feb 21, 2023

I have a personal taskd server for syncing. Many, many duplicates. Will forego using recurrence for now and watch this thread.

@Werkov
Copy link
Contributor

Werkov commented Feb 21, 2023

Interestingly, the following snippet from the man page is missing here:

Note: If you use multiple sync clients, make sure this setting (which is the
default) is on your primary client:

   recurrence=on

 and on all other clients (this is not the default):

   recurrence=off

 This is a workaround to avoid a recurrence bug that duplicates recurring
 tasks.

Yeah, requires picking the primary client.

Also, I reduced the trouble by using relative recurrence for suitable tasks.

@ToxicFrog
Copy link

Same issue here, taskd 1.1.0, taskwarrior 2.6.2.

It's not an issue with multiple clients having recurrence on, because there are only two machines involved here and only one of them has recurrence on. As others have reported earlier here, they all have floating-point mask indices rather than integer.

@djmitche
Copy link
Collaborator

djmitche commented Jul 30, 2023 via email

@ToxicFrog
Copy link

And I'm looking forward to it, but I need workarounds in the meantime.

What seemed to work for me was:

  • adding on-add, on-exit, and on-modify hooks to both clients to convert float imasks to int imasks
  • shutting off taskd, editing both the taskwarrior and taskd state files to convert already-saved float imasks to ints, then turning taskd back on

A bit of a blunt instrument, but the problem hasn't recurred since.

@djmitche djmitche removed this from the 3.0.0 milestone Apr 1, 2024
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