Document custom recurrence RRULE patterns and fix stale field names

API.md now lists the supported custom RRULE patterns (every Wednesday,
every other Wednesday, every second Tuesday, every 15th, etc.) matching
the newly implemented dateutil.rrule evaluation. CLAUDE.md's Task model
reference also gets corrected: it listed recurrence_type/recurrence_interval
fields that never existed on the model.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Keith Smith
2026-08-31 21:21:50 -06:00
co-authored by Claude Sonnet 5
parent 70dcc1f001
commit 9b686d3ce3
3 changed files with 18 additions and 6 deletions
+14 -2
View File
@@ -1050,11 +1050,23 @@ Use `page` query parameter to navigate: `?page=2`
- New instance has `status: pending` and calculated `due_date` - New instance has `status: pending` and calculated `due_date`
- Recurrence stops at `recurrence_end_date` if specified - Recurrence stops at `recurrence_end_date` if specified
**Custom RRULE Example:** **Custom RRULE Patterns:**
`recurrence_rule` accepts a standard RFC5545 RRULE string, evaluated via `dateutil.rrule`. Currently supported: `FREQ=WEEKLY` (with `INTERVAL` and `BYDAY`) and `FREQ=MONTHLY` (with `INTERVAL` and either `BYMONTHDAY` or an ordinal-prefixed `BYDAY`). The web UI's Custom recurrence builder generates these same strings.
| Pattern | `recurrence_rule` |
|---|---|
| Every Wednesday | `FREQ=WEEKLY;INTERVAL=1;BYDAY=WE` |
| Every other Wednesday | `FREQ=WEEKLY;INTERVAL=2;BYDAY=WE` |
| Every Mon/Wed/Fri | `FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR` |
| Every 15th of the month | `FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=15` |
| Every second Tuesday | `FREQ=MONTHLY;INTERVAL=1;BYDAY=2TU` |
| Last Friday of the month | `FREQ=MONTHLY;INTERVAL=1;BYDAY=-1FR` |
```json ```json
{ {
"recurrence": "custom", "recurrence": "custom",
"recurrence_rule": "FREQ=WEEKLY;BYDAY=MO,WE,FR", "recurrence_rule": "FREQ=MONTHLY;INTERVAL=1;BYDAY=2TU",
"recurrence_end_date": "2024-12-31" "recurrence_end_date": "2024-12-31"
} }
``` ```
+3 -3
View File
@@ -97,7 +97,7 @@ celery -A config beat -l info
**tasks/** - Core task management **tasks/** - Core task management
- Hierarchical tasks with parent/subtask relationships - Hierarchical tasks with parent/subtask relationships
- Task status (pending, in_progress, completed, cancelled) and priority (low, medium, high, urgent) - Task status (pending, in_progress, completed, cancelled) and priority (low, medium, high, urgent)
- Recurrence patterns (daily, weekly, monthly, yearly, custom RRULE) - Recurrence patterns (daily, weekly, biweekly, monthly, yearly, or custom RRULE for day-of-week/nth-weekday/day-of-month control)
- Time tracking with start/stop timer functionality - Time tracking with start/stop timer functionality
- Tag system with colors and icons for organization - Tag system with colors and icons for organization
- Task sharing with permission levels (viewer/editor) - Task sharing with permission levels (viewer/editor)
@@ -234,7 +234,7 @@ Configured in `config/celery.py`:
- Hierarchy: `parent` (ForeignKey to self) - Hierarchy: `parent` (ForeignKey to self)
- Status: pending, in_progress, completed, cancelled - Status: pending, in_progress, completed, cancelled
- Priority: low, medium, high, urgent - Priority: low, medium, high, urgent
- Recurrence: `recurrence_type`, `recurrence_interval`, `recurrence_rule` (RRULE) - Recurrence: `recurrence` (none/daily/weekly/biweekly/monthly/yearly/custom), `recurrence_rule` (RRULE string, used when `recurrence='custom'`, parsed via `dateutil.rrule`), `recurrence_end_date`
- Timing: `due_date`, `due_time`, `completed_at`, `created_at`, `updated_at` - Timing: `due_date`, `due_time`, `completed_at`, `created_at`, `updated_at`
- Soft delete: `is_deleted` (filters via `SoftDeleteManager`) - Soft delete: `is_deleted` (filters via `SoftDeleteManager`)
- Sync: `sync_id` (UUID for mobile sync) - Sync: `sync_id` (UUID for mobile sync)
@@ -362,7 +362,7 @@ make test # Run tests in container
### Common Development Patterns ### Common Development Patterns
**Creating Recurring Tasks:** When a recurring task is marked complete, the next recurrence is automatically created in `tasks/models.py` `create_next_recurrence()` method. Celery task `process_recurring_tasks()` runs as safety net. **Creating Recurring Tasks:** When a recurring task is marked complete, the next recurrence is automatically created in `tasks/models.py` `create_next_recurrence()` method, which calls `calculate_next_due_date()`. For `recurrence='custom'`, the next date is computed by evaluating `recurrence_rule` (an RRULE string) via `dateutil.rrule`; the web UI's Custom recurrence builder (in `templates/tasks/_recurrence_fields.html` and `static/js/app.js`) generates these strings for day-of-week, nth-weekday, and day-of-month patterns. Celery task `process_recurring_tasks()` runs as safety net.
**Time Entry Workflow:** **Time Entry Workflow:**
1. `POST /api/tasks/<id>/start-timer/` creates TimeEntry with start_time 1. `POST /api/tasks/<id>/start-timer/` creates TimeEntry with start_time
+1 -1
View File
@@ -9,7 +9,7 @@ A powerful Django-based task management system with time tracking, tag organizat
- **Priority Levels**: Low, Medium, High, and Urgent - **Priority Levels**: Low, Medium, High, and Urgent
- **Status Tracking**: Pending, In Progress, Completed, Cancelled - **Status Tracking**: Pending, In Progress, Completed, Cancelled
- **Due Dates & Times**: Set specific due dates and times for tasks - **Due Dates & Times**: Set specific due dates and times for tasks
- **Recurrence**: Daily, Weekly, Bi-weekly, Monthly, Yearly, and Custom patterns - **Recurrence**: Daily, Weekly, Bi-weekly, Monthly, Yearly, plus Custom RRULE patterns (e.g. every other Wednesday, every second Tuesday, every 15th of the month)
### Organization ### Organization
- **Tag-Based System**: Organize tasks with multiple colored tags - **Tag-Based System**: Organize tasks with multiple colored tags