Closed SevereOverfl0w closed 2 years ago
I never used threshold in my todo lists, and did not know about that bug. Thanks for reporting!
Note, some tasks might have both t: and due: with different dates set
In the beginning, I tried a few way to deal with t
and due
. One way was: on done increase both t
and due
by rec
. I think it is expected behavior. And as I cannot use the easy solution I was thinking of, it take a little time more.
I believe this is the behaviour other tools use, yes!
A question: what is the best way to deal with threshold when creating new task in case of both due and threshold dates exist? As far as I understand, the threshold must be less than due date. So, I cannot apply the same algorithm to both threshold and due dates. Because it may make them the same. At this moment I chose the following rules:
Does it look good for you?
P.S. For case: recurrence and threshold are set, but due date is missing, the threshold is increased using existing rules for due dates. I do not think there is another way in this case.
As far as I understand, the threshold must be less than due date.
Not true. I often set them to be the same! I can't action some tasks until the day it is due (e.g. picking up dry cleaning). One big reason I use due dates is because SimpleTask puts them onto my calendar.
This algorithm you describe is different from how SimpleTask and topydo behave which are my frame of reference. Here's the code in SimpleTask for marking a task as complete which shows the algorithm in use: https://github.com/mpcjanssen/simpletask-android/blob/3394b4e1bd901cce87e059eac4b2af71c93e2c50/app/src/main/java/nl/mpcjanssen/simpletask/task/Task.kt#L176-L201
I think you can treat them in exactly the same way, and it's OK if they are set to the same date when using rec:2d
. Mostly I use the format with + rec:+2d
with tasks with a due date where I care about preserving the gap between the due & threshold date.
I thought that keeping gap the same was the most important. Doing the way you describe is easier to implement, but in case of non-strict recurrence, it makes both threshold and due the same after the very first done
which makes threshold kind of useless for non-strict recurrent task. I did not think it was intended, so I implemented "the constant gap". On the other hand, I think, that having both recurrence and threshold is not common, so it may be good enough solution.
Anyway, even in strict mode, it is possible to get threshold == due because +1m
always generates a date within the next month. The corner case is like t:2020-01-29 due:2020-01-31
. As February has only 29 days, after done it generates t:2020-02-29 due:2020-02-29
. Zero gap instead of two days.
If all corner cases above are not a problem, I can implement it this way: just increase both threshold and due date without trying to keep a gap.
In 3.1.0 threshold date and due dates are treated the same way: both are increased by todo's recurrence.
That's great, thanks! I'm updating now and will give it a spin.
I noticed that a task containing
t:
andrec:
will not recur like a task containingdue:
will.Note, some tasks might have both
t:
anddue:
with different dates set (e.g. report is due on a date, but the data for it isn't ready until 3 days before the due date).