-
-
Notifications
You must be signed in to change notification settings - Fork 164
Fixes a bug in completing future tasks #470
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
Fixes a bug in completing future tasks #470
Conversation
Updates the repeater logic so that tasks which are completed before their deadline has been reached, will properly repeat forward.
Can you please give an example? I'm not sure what's the difference between old and new code. |
The issue that I've run into recently is that I have tasks for buying Christmas presents for friends and family. I have the In the old logic, an entry would be made in the logbook but the deadline would not be updated because the while loop which incremented the Now with my new logic, at least one increment will occur before the condition of the while loop is checked. Essentially it's the difference between a I should note that for my emacs testing, I'm using the official EDIT: Fixed some typos |
This commit also includes some slight changes and additional comments to the relevant code to help the next programmer understand more quickly what this code is doing. |
Thanks for the explanation. It is indeed a bug. Could you also please add a test case for this in the |
I've added a test as requested. It's the first Lua test I've ever had to write so please don't hesitate to let me know if any adjustments should be made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test looks good, just a minor tweak and it's good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks great now, thanks!
Updates the repeater logic so that tasks which are completed before
their deadline has been reached, will properly repeat forward.