Skip to content

(BACKEND) - Add recurrence support for tasks #92

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

Closed
wants to merge 0 commits into from

Conversation

Advaitgaur004
Copy link
Contributor

#91 Fix - Backend

Add Task Recurrence Support

Description

Adds support for recurring tasks based on Taskwarrior's recurrence functionality. Users can now create and modify tasks with daily, weekly, monthly, or yearly recurrence patterns. For more reference (docs)

Changes

  • Added recurrence fields to Task model (Recur, Until, Mask)
  • Updated request body models to support recurrence parameters
  • Modified task handlers to process recurrence fields
  • Added validation for recurrence patterns
  • Added comprehensive test coverage for recurring tasks

Testing

Added test cases for:

  • Creating tasks with recurrence
  • Creating tasks without recurrence
  • Modifying task recurrence
  • Removing recurrence from tasks
  • Invalid recurrence patterns

Inside Backend run the following command

go test -v ./controllers -run "Test_(ModifyRecurringTask|AddTaskWithRecurrence)"

Usage Example

// Create a daily recurring task
{
  "description": "Daily Standup",
  "due": "2024-03-20",
  "recur": "daily",
  "until": "2024-06-20"
}

// Modify task to weekly recurrence
{
  "taskid": "123",
  "description": "Weekly Report",
  "due": "2024-03-22",
  "recur": "weekly"
}

Important

  • Supported recurrence patterns: daily, weekly, monthly, yearly
  • The until field is optional
  • Recurring tasks require a due date

@Advaitgaur004
Copy link
Contributor Author

it is continued in #93

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.

1 participant