question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: recurring logic gives wrong dates

See original GitHub issue

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

  1. make a task with due date in the past - [ ] qwe 🔁 every month on the 5th 📅 2022-06-20
  2. wait for Reminder popup
  3. Mark as Done
  4. 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:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
claremacraecommented, Sep 29, 2022

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.

1reaction
dima-stefantsovcommented, Jun 21, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

wrong date for recurring when completed in Reminders plugin ...
Not 60 days! This two issues making me lose trust in my tasks management. Now every time I've completed anything I'll have to...
Read more >
Recurring event shows incorrect time with advanced options ...
Created repeat event, seems to work fine. Modify advanced repeat rules to use BYDAY field. Now all repeat dates after the first for...
Read more >
Recurring logics Fails with Smart Proxy Errors - Support
Problem: Recurring logics wont work in the change of the date. Example: Last occurrence: 2022-02-17 ... A Task shows the following Error:
Read more >
Recurring event is wrong after it crosses day light savings
My scheduler is having a problem when a user creates a recurring event that crosses a time change (day light savings).
Read more >
1646525 – Recurring Logic / Recurring Execution Monthly ...
For example, if the recurring logic is created on 11/5, execution will be scheduled to always occur on the 5th of each month...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found