GothenburgBitFactory / GothenburgBitFactory/taskwarrior

[TW-1783] Deleting recurring tasks reports wrong number of affected

Open
#1,806 1 comment 0 reactions 0 assignees View on GitHub
topic:recurrence type:bug
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

_Daniel Shahaf on 2016-03-18T17:33:36Z says:_

In the following, `task` reports `Deleted 8 tasks`, although only six tasks were deleted: tasks #2 through #7.

The use of "recur every second" is to force a situation with two outstanding instances of a recurring task.

Seven tasks aren't needed for this; it should be reproducible with a single recurring task with two instances.

```
% task add one due:1s recur:1s
Created task 1 (recurrence template).
% task all

ID St UUID Age R Due Description
2 P 8fc066d1 - R 2016-03-18 one
3 P 3d31d3ac - R 2016-03-18 one
4 P a9a8827f - R 2016-03-18 one
5 P 94c49773 - R 2016-03-18 one
6 P de8cbfe1 - R 2016-03-18 one
7 P 8b4ee5b5 - R 2016-03-18 one
1 R 0623ebe1 5s R 2016-03-18 one

7 tasks
Creating recurring task instance 'one'
% task 2,3,4 delete
Delete task 2 'one'? (yes/no/all/quit) all
Deleting task 2 'one'.
This is a recurring task. Do you want to delete all pending recurrences of this same task? (yes/no) yes
Deleting recurring task 3 'one'.
Deleting recurring task 4 'one'.
Deleting recurring task 5 'one'.
Deleting recurring task 6 'one'.
Deleting recurring task 7 'one'.
Deleting task 3 'one'.
This is a recurring task. Do you want to delete all pending recurrences of this same task? (yes/no) yes
Deleting task 4 'one'.
This is a recurring task. Do you want to delete all pending recurrences of this same task? (yes/no) yes
Deleted 8 tasks.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.