fix(recurring): preserve due-threshold gap in non-strict recurrence#889
Open
wanhoff wants to merge 1 commit into
Open
fix(recurring): preserve due-threshold gap in non-strict recurrence#889wanhoff wants to merge 1 commit into
wanhoff wants to merge 1 commit into
Conversation
Lezurex
approved these changes
Jun 29, 2026
Lezurex
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, thanks for reporting and fixing this.
Regarding the tests: I can live regardless of whether we keep it or remove it, just a minor detail.
@ransome1 Could you let the checks run? I can't approve them myself unfortunately.
Comment on lines
+257
to
+268
| it("non-strict recurrence with 3-week interval preserves due/threshold gap (issue #886)", () => { | ||
| // due:2021-06-22, t:2021-06-15 → gap = 7 days | ||
| // completion date = 2021-06-01, rec:3w → new due = 2021-06-22 | ||
| // thresholdBase = 2021-06-22 − 7d = 2021-06-15 | ||
| // Bug: without fix thresholdBase + 3w = 2021-07-06 (interval applied twice) | ||
| // Fix: newThresholdDate = thresholdBase = 2021-06-15 (gap preserved) | ||
| createRecurringTodo("Task due:2021-06-22 t:2021-06-15 rec:3w", "3w"); | ||
| const todo = capturedTodo(); | ||
| expect(ext(todo, "due")).toBe("2021-06-22"); | ||
| expect(ext(todo, "t")).toBe("2021-06-15"); | ||
| }); | ||
|
|
Collaborator
There was a problem hiding this comment.
I think this testcase is redundant, as it covers the same logic as the already existing (and, thanks to you, now fixed) testcase did. Maybe remove this one but keep the reference to the issue 886 and move it to the testcase above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed problem with threshold on non strict recurring tasks
Worked to my best knowledge, but had limited ability to test. I have no sleek development environment on my computer.