Skip to content

Add --repeat flag for recurring tasks (daily, weekly, monthly)#93

Open
vj031206 wants to merge 5 commits intoTheDevOpsBlueprint:mainfrom
vj031206:feature/adding-recurring-tasks
Open

Add --repeat flag for recurring tasks (daily, weekly, monthly)#93
vj031206 wants to merge 5 commits intoTheDevOpsBlueprint:mainfrom
vj031206:feature/adding-recurring-tasks

Conversation

@vj031206
Copy link

@vj031206 vj031206 commented Oct 6, 2025

PR Checklist

  • Follows single-purpose principle
  • Tests pass locally
  • Documentation updated (if needed)

What does this PR do?

This PR implements support for recurring tasks in Tix CLI. Changes include:

  1. --repeat flag: Users can now create tasks with --repeat daily | weekly | monthly.
  2. Automatic creation of new task on completion: When a recurring task is marked as done, a new instance is created.
  3. Track recurrence in task model: Task objects now store their recurrence interval (daily, weekly, monthly).

No additional features, tests, or documentation have been added beyond what was requested.

Demo
Screenshot 2025-10-11 175259
CLI output showing a daily recurring task created after marking the previous one as done.

Related Issue

Closes #18

Type of change

  • Bug fix
  • New feature
  • Configuration
  • Documentation

@vj031206
Copy link
Author

vj031206 commented Oct 6, 2025

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:
Adding a due date field for recurring tasks so they appear in the correct interval automatically.
Showing upcoming recurring tasks in the ls view immediately after completion.
Enhancing CLI output for better clarity of recurring tasks and intervals.
Additional prompt and feature to delete only iteration or all future tasks as well for a recurring task.
Search tasks using their recurrence property
Display only tasks which are recurring, like a recurrence filter

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.
Also, I would appreciate if you could merge these changes under the #Hacktoberfest #Hacktoberfest25 tags as well so it reflects in my PR counts.

@vj031206 vj031206 force-pushed the feature/adding-recurring-tasks branch from 5558794 to 8dc8279 Compare October 10, 2025 04:18
@Valentin-v-Todorov
Copy link
Contributor

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 ✌️

@vj031206
Copy link
Author

vj031206 commented Oct 11, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support recurring/repeating tasks

2 participants