Add --repeat flag for recurring tasks (daily, weekly, monthly)#93
Add --repeat flag for recurring tasks (daily, weekly, monthly)#93vj031206 wants to merge 5 commits intoTheDevOpsBlueprint:mainfrom
Conversation
|
I want to clarify that this PR implements only the changes that were requested: the --repeat flag, automatic creation of the next task on completion, and tracking recurrence in the task model. Since I’m a beginner, I did not add tests, documentation, or extra features, but some possible improvements for future work include: These are just suggestions to make the recurrence feature more complete; they’re not included in this PR. I would like to make those changes if possible, if you create an issue about it and assign it to me. |
5558794 to
8dc8279
Compare
|
Hey @vj031206 , thanks for working on this feature! However, there are several critical issues that will break the tool if merged. In tix/cli.py line 190, you're using a repeat parameter in the function signature but never added the @click.option('--repeat', ...) decorator above it. Lines 272-312 have massive code duplication where you're building the table twice with conflicting logic, which will completely break the display. The recurring task creation logic on lines 394-405 is incomplete - it only creates a new task if you complete it on the exact due date, and even then it doesn't pass the repeat parameter to the new task so it won't actually recur. In tix/storage/json_storage.py line 102, you're passing repeats=repeat but the add_task function signature on line 92 is missing the repeat parameter entirely, so this will crash immediately. In tix/models.py lines 37 and 57, you're missing commas after the repeats entries in both to_dict() and from_dict() methods, causing syntax errors. The fundamental design issue is that recurring tasks should create the next instance immediately when marked done, not wait until the date arrives. Users need to see upcoming recurring tasks in advance for this feature to be useful. I appreciate your transparency about being a beginner and your improvement suggestions. However, this PR needs the issues fixed before it can work at all. Add the missing click option decorator, remove the duplicate table code, fix the function signatures to include the repeat parameter, add the missing commas, and implement proper immediate creation of the next recurring instance. Test everything thoroughly and we can merge this. There is no need for #Hacktoberfest #Hacktoberfest25 tags. The repository have the Hacktoberfest topics already added ✌️ |
|
I apologize for making these blunders during merging conflicts causing duplication and removal of certain lines such as my click command, now I have also fixed "that recurring tasks should create the next instance immediately when marked done, not wait until the date arrives." Please check if it is correct now, I have added a due date column in ls to show the due date of the task and now the recurrence of the task is stored as a tag. |
PR Checklist
What does this PR do?
This PR implements support for recurring tasks in Tix CLI. Changes include:
No additional features, tests, or documentation have been added beyond what was requested.
Demo

CLI output showing a daily recurring task created after marking the previous one as done.
Related Issue
Closes #18
Type of change