repeat-from-done actually repeats from script run time rather than done time
Scenario:
-
- some task @start(2021-07-19) @due(2021-07-19) @repeat(Monday,Tuesday,Wednesday,Thursday,Friday) @repeat-from-done -
Task above gets marked done on 7-19 (tag added:
@done(2021-07-19)), but for whatever reason the repeat script isn't run immediately (e.g., maybe the user never launched it, or the task list was marked done outside of TaskPaper). -
User opens TaskPaper the next day (7-20) and launches taskpaper-repeat to generate recurrences.
-
Expected:
- some task @start(2021-07-20) ...is created. Actual:- some task @start(2021-07-21) ...is created.
Looking at the source code of the script, it appears this is happening around lines 27-29, where the new date is not actually being generated from the "done" date, but from the "now" date. In many cases those will be the same, but if the script is not run at the same time the @done tag is added, they could be entirely different dates.
This is a very useful script that neatly solves a common problem, by the way. Out of curiosity, how come the script itself is not in this repository, only added to it as a release resource?