[Bug]: recurring logic gives wrong dates
Describe 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
This one is serious though
- [ ] reminder popup birthday fail 🔁 every year 📅 2023-06-21
- [x] reminder popup birthday fail 🔁 every year 📅 2022-06-18 ✅ 2022-06-21
- [ ] tasks native birthday 🔁 every year 📅 2023-06-18
- [x] tasks native birthday 🔁 every year 📅 2022-06-18 ✅ 2022-06-21
Same with "remind later", it will change birthday to a wrong date permanently. Currently Reminder is dangerous to use with recurring dates.
for users reading, a quick CSS fix for Reminder popup:
/* fix reminder actions */
.modal .reminder-actions {
display: none;
}

then use default Tasks action

PR is welcome.
by the way that code suggested not just date, but time is supported too, but I failed to incorporate due time in recurring tasks
Use ⏰.
https://uphy.github.io/obsidian-reminder/guide/interop-tasks.html#tasks-plugin-s-task-format
Related code: https://github.com/uphy/obsidian-reminder/blob/82030551fbce60b0120e28b644da1d474f079419/src/model/format/reminder-tasks-plugin.ts#L238
The issue was reproduced with the following code but I don't know why it is occured.
test('modify() - default - every month', async () => {
await testModify({
now: "2021-09-13",
customEmoji: false,
inputMarkdown: `- [ ] Task 🔁 every month on the 5th 📅 2021-09-12`,
expectedMarkdown: `- [ ] Task 🔁 every month on the 5th 📅 2021-10-05
- [x] Task 🔁 every month on the 5th 📅 2021-09-12 ✅ 2021-09-13`
});
});
https://github.com/uphy/obsidian-reminder/blob/82030551fbce60b0120e28b644da1d474f079419/src/model/format/reminder-kanban-plugin.test.ts
PR is welcome.
by the way that code suggested not just date, but time is supported too, but I failed to incorporate due time in recurring tasks
Use
⏰. https://uphy.github.io/obsidian-reminder/guide/interop-tasks.html#tasks-plugin-s-task-format
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.
a female that took over Tasks maintaining made me describe it twice, and then closed it without helping. Maybe you will help
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.
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.
This is about a year old now but came across it researching the Tasks plugin and just have to say I actually laughed reading it.
@claremacrae you might need to update the Tasks doc that refs this because it notes August of 2022 this is still an issue but it was resolved in Nov?
@claremacrae you might need to update the Tasks doc that refs this because it notes August of 2022 this is still an issue but it was resolved in Nov?
Thanks for the suggestion. If you have time to add an issue in Tasks as a reminder for this, it would be greatly appreciated.