Add dropDate/droppedAfter, local-midnight bare dates, and task sequential field - #5
Add dropDate/droppedAfter, local-midnight bare dates, and task sequential field#5vishae wants to merge 3 commits into
Conversation
…erId null on completed tasks list_tasks didn't expose a completed task's completionDate (only get_task did), and there was no way to filter by completion date server-side. Added completionDate to list_tasks' output and a completedAfter (ISO datetime) filter, following the existing dueBeforeDate pattern. Separately, list_tasks and get_task both resolved a task's containerId/ containerType via assignedContainer, which comes back null for completed tasks. Other write-path snippets (move_task, complete_task, create_task, edit_task, drop_task) already avoid this via parentTask/containingProject instead -- move_task.js even has a comment noting assignedContainer "doesn't update after moveTasks". Applied the same fix to list_tasks and get_task so completed tasks resolve their container correctly too. package-lock.json also resyncs to package.json's current name/version (0.1.0 -> @scardis/omnifocus-mcp@0.1.2), which had drifted.
…tial field Closes TECH-017 Gaps 1 & 2: - list_tasks/get_task/create_task/edit_task/drop_task/complete_task now return dropDate (via effectiveDropDate); list_tasks gains a droppedAfter filter, mirroring the completionDate/completedAfter pattern. - create_task/edit_task deferDate/plannedDate/dueDate accept a bare YYYY-MM-DD date, resolved to local midnight instead of JS's default of UTC midnight — a defer-today task is now Available immediately rather than only after the local UTC-offset hour. - create_task/edit_task can set a task's own sequential (parallel/ordered subtasks); surfaced on all task-detail responses. - move_task's inline response object was missing completionDate/dropDate entirely (a pre-existing gap once TaskSummary made completionDate required); added both for consistency.
|
Closing in favour of #6, which contains every commit in this branch plus the effective-completion-date work. Keeping both open guarantees a conflict between them, and #6 is the one carrying the extra test coverage. Nothing here is rejected — the substance of this PR (bare-date handling resolved to local midnight, Two things from that review that will need addressing on #6 and originate in these commits:
Please continue on #6. |
Stacked on #2 — this branch is built on top of
list-tasks-completion-date(already open as #2), so this diff currently includes that commit too. Once #2 merges, this PR's diff will shrink to just the two commits below; happy to rebase at that point if useful.Three additions, following the existing
completionDate/completedAfterpattern from #2:list_tasks/get_task/create_task/edit_task/drop_task/complete_tasknow returndropDate(viaeffectiveDropDate), andlist_tasksgains adroppedAfterfilter — so "dropped since X" can be queried the same way "completed since X" can, instead of scanning every dropped task ever.create_task/edit_tasknow accept a bareYYYY-MM-DDin addition to a full ISO datetime fordeferDate/plannedDate/dueDate. A bare date resolves to local midnight on the machine running the connector — previouslynew Date("2026-07-17")parsed as UTC midnight, so a task deferred to "today" could stay Blocked for several hours after midnight local time (until the UTC-offset hour), rather than being Available immediately.sequential.create_task/edit_taskcan now set a task's ownsequential(whether its subtasks must be completed in order), surfaced on all task-detail responses. The underlying OmniFocus API already supports this viatask.sequential— it just wasn't exposed as a connector field before.Also fixed
move_task's inline response, which was missingcompletionDate/dropDateentirely (a gap once #2 madecompletionDatea requiredTaskSummaryfield).Test plan
npm test— 151 unit tests passnpm run test:integration— 96/96 pass, including new coverage for all three changes (bare-date-to-local-midnight, sequential set/read, dropDate/droppedAfter).mcpblocally; verified live against a real OmniFocus database — bare-date defer producedstatus: "available"immediately withdeferDateat exact local midnight;sequential: trueset and read back correctly;dropDatepopulated on drop anddroppedAftercorrectly narrowed results