Skip to content

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