taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

separate "until" and "recur until" attributes

Open tunbridgep opened this issue 4 years ago • 7 comments

Currently, when using recurrence, the "Until" field determines when the recurrance stops. Take this example from the taskwarrior docs

task add Pay the rent due:1st recur:monthly until:2015-03-31
Created task 123.

This will make a task "Pay the rent" which will recur monthly, and stop recurring on 2015-03-01. This is great functionality, however it prevents creating any recurring tasks where the task instances themselves need to have an until date.

For example, if I want the task

task add "Put the garbage out" due:sunday recur:weekly

I would likely want that task to expire after a week, so I can have the next weeks garbage task instead.

If I try to do this

task add "Put the garbage out" due:sunday recur:weekly until:due+6d

This will make the task stop recurring after one week, which is unintended.

Is this something that can be separated out somehow?

tunbridgep avatar Jul 21 '20 04:07 tunbridgep

Similarly, it would also be useful to have a scheduled datetime for each recurrence itself. Quoting the same example with the rent. Lets say you get the bill alway in the last week of the month. Then being able to do something like the following would be useful:

task add Pay the rent due:1st scheduled:due-7d recur:monthly until:2015-03-31

jcjgraf avatar Mar 02 '21 20:03 jcjgraf

@jcjgraf @tunbridgep

In terms of planning, I wonder if the design document for the planned recurrence overhaul is addressing these concerns? https://taskwarrior.org/docs/design/recurrence.html

tbabej avatar Mar 02 '21 20:03 tbabej

Thanks @tbabej for your quick response!

This overhaul seems very promising and actually addresses my stated problem (in Proposal: Use relative offsets). Though, it does not address the problem stated by @tunbridgep.

You could solve that doing something like:

  • Apply Proposal: Use relative offsets (in addition to wait and schedule) also to the until keyword.
  • Add something like Proposal: New 'runtil' attribute which defines till what date the task should recur (i.e. it does what until does in the current implementation).

jcjgraf avatar Mar 03 '21 09:03 jcjgraf

Adding this as feedback to the recurrence overhaul tracker so that we don't forget about it.

tbabej avatar Mar 05 '21 03:03 tbabej

"until" and "recur until" are certainly different things, and easily confused, so what if we re-named "recur until" to "recur end" or "end recur"? Would that help?

linuxcaffe avatar Oct 10 '21 21:10 linuxcaffe

Is anyone interested in working on this problem? I'd really like to be able to say like: "recur:daily recur-until:due+5days" recurrence happens for 5 days regardless of recurrence period. Or: "recur:daily+5" recur daily for 5 times only.

Let me know what you think!

kyjb70 avatar Jun 08 '24 02:06 kyjb70

@tunbridgep This is how I solved it: https://github.com/scottyob/taskwarrior-better-recur

scottyob avatar Jul 03 '24 18:07 scottyob