sleek: Broken non-strict recurrence

Bug Report

App Version: sleek-2.0.3-rc.5 (was present in sleek-2.0.0-dev15)

Platform: Linux

Installation Method: AppImage

Bug Description: Sleek should determine between strict recurrence (rec:+X) and non-strict recurrence (rec:X). It seems that all cases are treated as strict recurrnce. https://github.com/ransome1/sleek/wiki/Recurring-todos-(rec:)

Steps to Reproduce: Enter such tasks and complete them:

2022-01-01 task1 - non-strict recurrence rec:1d t:2023-01-01
2022-01-01 task2 - strict recurrence rec:+1d t:2023-01-01

Expected Behavior:

x 2023-12-11 2022-01-01 task1 - non-strict recurrence rec:1d t:2023-01-01
x 2023-12-11 2022-01-01 task2 - strict recurrence rec:+1d t:2023-01-01
2023-12-11 task1 - non-strict recurrence rec:1d t:2023-12-12
2023-12-11 task2 - strict recurrence rec:+1d t:2023-01-02

Actual Behavior:

x 2023-12-11 2022-01-01 task1 - non-strict recurrence rec:1d t:2023-01-01
x 2023-12-11 2022-01-01 task2 - strict recurrence rec:+1d t:2023-01-01
2022-01-01 task1 - non-strict recurrence rec:1d t:2023-01-02
2022-01-01 task2 - strict recurrence rec:+1d t:2023-01-02

Additional Information:

New tasks should have creation date set to today, instead old date is reused.

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 34 (18 by maintainers)

Most upvoted comments

Then it’s as good as it gets! 😀 Again, thank you both for your commitment in ironing out all these nuanced cases. It took some back and forth, but I belive the result was worth it.

Ok good news I guess. I used your cases and was able to create the expected output, of course in a different order:

x 2023-12-14 2022-01-01 task1 - non-strict recurrence rec:1d t:2023-01-01
x 2023-12-14 2022-01-01 task2 - strict recurrence rec:+1d t:2023-01-01
x 2023-12-14 2022-01-01 task3 - non-strict recurrence rec:1m t:2023-01-01 due:2023-01-10
x 2023-12-14 2022-01-01 task4 - strict recurrence rec:+1m t:2023-01-01 due:2023-01-10
x 2023-12-14 2022-01-01 task5 - non-strict recurrence rec:1m due:2023-01-10
x 2023-12-14 2022-01-01 task6 - strict recurrence rec:+1m due:2023-01-10
2023-12-14 task1 - non-strict recurrence rec:1d t:2023-12-15
2023-12-14 task2 - strict recurrence rec:+1d t:2023-01-02
2023-12-14 task3 - non-strict recurrence rec:1m t:2024-01-05 due:2024-01-14
2023-12-14 task4 - strict recurrence rec:+1m t:2023-02-01 due:2023-02-10
2023-12-14 task5 - non-strict recurrence rec:1m due:2024-01-14
2023-12-14 task6 - strict recurrence rec:+1m due:2023-02-10

It will be included in the next pre release, feel free to give it another proper testing.

It was a relativelly simple bug, both in the code and the tests. I created a PR to fix it. (The PR does not contain a fix for the creation dates though. Maybe @ransome1 you can have a look at that once you’re back.)