-
-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: create repeat tasks if missed in the days before #2694 #2695
base: master
Are you sure you want to change the base?
Conversation
@johannesjo this pull request proposes to change the behaviour of I see the current behaviour of |
Thanks for the PR. There are two things we should consider:
|
Thanks for the comments @johannesjo.
That's fair enough.
It seems that in normal daily usage the invariant is that there is only ever one active (not completed) instance of a repeating task config. This is because at midnight all daily repeating tasks of the previous day automatically get marked done. Keeping in line with this invariant, in your example we could either:
The PR implements the former behaviour. The latter behaviour is effectively the same as if the app was left running unattended for days. I believe the easiest user experience would be if we stick to this behaviour without prompting the user. Do you agree? |
Yes you're right! Creating just the last missed instance is probably the best solution :) Could you have a look at the failing unit tests? |
ping @ishanarora :) |
Apologies, I haven't had the time to take this up recently. It seems the invariant I mentioned above no longer holds since cbc0ff4. In light of that I would be happy to change the behaviour of this PR to create all missed instances with the creation date set to the original due day for each. Agreed? Since this PR is more of a bugfix, I believe the feature to prompt the user in case there are many tasks to be created can be a separate PR. |
No worries!
Also a possibility, but we should limit this to maybe the last 5(?) instances to avoid a task explosion. Like this we also don't need the prompt. What do you think? |
After further discussing this I think that the best approach might be to provide a new config to each repeatable tasks that lets the user decide if missed instances should be created, or not. So users can choose themselves. Something like a daily reminder shouldn't be recreated for every missed day, but something like "do your monthly tax form" definitely should. Are you still interested in working on this? |
I think that's a good idea. Perhaps we can add configuration options for:
I'm afraid the work ahead is fairly outside my area of expertise. I don't know Angular, and the little TS I know I learned for small PRs like this one. We could close this PR since it will need a rewrite for the changed requirements. Also I've come across a couple of alternative approches in the wild:
|
@ishanarora Thank you very much for your input! This is very helpful! I can try to pick this up then, if it is alright with you, though I don't know when I will get to it... :) |
@johannesjo yes, of course! I that case may I suggest merging this pull request as a hotfix for #2694 in the meantime. I believe #2694 is a critical bug e.g. it caused a missing annual income tax filing task because of the annual recurrence date landed on a Sunday. The PR still needs updating the unit tests for |
This PR has not received any updates in 90 days. Please comment, if this still relevant! |
Description
selectTaskRepeatCfgsDueOnDay
now selectstaskRepeatCfgs
that were due on any day afterlastTaskCreation
untildayDate
Issues Resolved
Fixes #2694
Check List