Implement opal-task Phase 3: Filter and Modifier Parsing

- Add filter.go: Parse filters (+tag, -tag, attribute:value, IDs)
- Implement Filter.ToSQL() for WHERE clause generation
- Add modifier.go: Parse modifiers (set/clear attributes, add/remove tags)
- Implement Modifier.Apply() to update existing tasks
- Add dateparse.go: Smart date parsing (ISO, today, tomorrow, weekdays)
- Implement nextWeekday logic (smart Sunday interpretation)
- Update GetTasks() to accept Filter parameter
- Add CreateTaskWithModifier() for task creation with modifiers
- Add comprehensive test suite (13 new tests, all passing)
- Support filtering by status, project, priority, tags, UUIDs, display IDs
- Support modifying priority, project, dates, recurrence, tags
This commit is contained in:
2026-01-04 14:48:43 +01:00
parent 7c6ec97c62
commit c99a4a2d95
7 changed files with 999 additions and 7 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ func TestGetTasks(t *testing.T) {
CreateTask("Task 2")
CreateTask("Task 3")
tasks, err := GetTasks()
tasks, err := GetTasks(nil)
if err != nil {
t.Fatalf("Failed to get tasks: %v", err)
}