[Bug]: recurring logic gives wrong dates
See original GitHub issueDescribe the bug
when I make recurring task “every month on the 5th”, when completing it with Reminder popup, I get a new task on the 6th, not the 5th
when completing it natively with Tasks, date is right. I’ve looked in sources, and looks like you are making your own new-date calculation. Which is wrong. (by the way that code suggested not just date, but time is supported too, but I failed to incorporate due time in recurring tasks)
Expected Behavior
Since recurring functional only available when using Tasks, I am really expecting Reminder to just rely on Tasks code to implement the “mark as done”.
I expect to trust my tasks system, not having to double-check it every time. Some recurrence cases give just 6th instead of 5th, some give date tomorrow instead of week ahead, this is not good.
Steps to reproduce
a female that took over Tasks maintaining made me describe it twice, and then closed it without helping. Maybe you will help
a pretty clear description with screenshots and arrows https://github.com/obsidian-tasks-group/obsidian-tasks/issues/787
a complete plug-and-play repository with case reproduced https://github.com/obsidian-tasks-group/obsidian-tasks/issues/792
I’m giving it a shot for the 3rd time, maybe you will actually be interested in fixing this bug, unlike my previous experience
- make a task with due date in the past
- [ ] qwe 🔁 every month on the 5th 📅 2022-06-20
- wait for Reminder popup
- Mark as Done
- see new task is created for the 6th
- [ ] qwe 🔁 every month on the 5th 📅 2022-07-06
- [x] qwe 🔁 every month on the 5th 📅 2022-06-20 ✅ 2022-06-21
Operating system
Windows
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
I’m the “female”
dima-stefantsov
referred to above. Sad to see the several hours of my own time I spent on that issue being dismissed as “not helping”.Hi @uphy - nevertheless, If you can find the time to read my comments in https://github.com/obsidian-tasks-group/obsidian-tasks/issues/792, you’ll see that I said that fixing the recurrence code in Reminders is outside the scope of Tasks, which is why I closed the issue - BUT I explicitly offered to work with you, if you wish, to see how we can make both our plugins play well with each other.
Ideally I would like to find a way so that other plugins that use Tasks’ Recurrence rules can find a way to use the logic in Tasks to do the recurrence calculation.
Are you interested in pairing together, initially on this issue, and later perhaps on better integration of these two plugins?
Also FYI: there’s a PR in Tasks that I would really like to accept, that would make Tasks support Reminders emojis - https://github.com/obsidian-tasks-group/obsidian-tasks/pull/432. I would also need to make Tasks’ recurrence code increment the reminder date in the new task, which will be easy.
But I’m nervous about rolling out support for Reminders in Tasks whilst anyone using the Reminders alert to complete a task would find the recurrence broken - hence being keen to help you with this issue, if I can.
Oh indeed I remember testing that. When I enable this “distinguish” thing, most of my tasks which only have due date, no time, are not recognized anymore, so this won’t work for me.
As for PRs, I live by clean code, and what I see in https://github.com/obsidianmd/obsidian-sample-plugin is pure madness. It reminds me of a rust hello-world example https://github.com/mTvare6/hello-world.rs Just to add a button to show an alert there are some npm magic, lint, manifests, dependencies, static typing, compilation (for the js with a killer feature of no compilation, yeah thanks), etc.
I’ll try looking into obsidian coding, plan is to remove 90% code, and release is as a simple “Tasks Agenda” plugin. If I cound drop static typing that would be best.