Add date filtering for Todoist project syncs#724
Add date filtering for Todoist project syncs#724felciano wants to merge 11 commits intoNotePlan:mainfrom
Conversation
- Add projectDateFilter setting with choices: all, today, overdue|today, 7 days - Default to 'overdue | today' to focus on actionable tasks - Fix URL encoding in filter construction - Update README with documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Support /todoist sync project today - Support /todoist sync project overdue - Support /todoist sync project current (today+overdue) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- /todoist sync project today (alias: tospt) - /todoist sync project overdue (alias: tospo) - /todoist sync project current (alias: tospc) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ensureHeadingExists helper function - Create section headings from Todoist automatically - Create default header from settings automatically Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use for...of instead of forEach for proper async/await - Add filterTasksByDate() for client-side filtering - Todoist API ignores filter param when project_id is specified Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace ensureHeadingExists with addTaskBelowHeading - When heading doesn't exist, append both heading and task - Use appendTodo after creating heading instead of addTodoBelowHeadingTitle Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add isEditorNote flag throughout the call chain - Use Editor.appendParagraph instead of note methods for current note - Fixes tasks not appearing when syncing the open note Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Read todoist_filter from note frontmatter - Priority: command-line > frontmatter > settings - Valid values: all, today, overdue, current, 7 days - Updated README with documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@dbludeau this is my first PR for Noteplan and I'm not sure I fully understand the process. Please let me know if you need more from me |
|
@felciano 2 issues cropping up in early testing.
|
|
Thanks @dbludeau I will review both of these this week |
Reverts heading-related commits that were incorrectly added to this branch: - Auto-create headings if they don't exist - Fix heading creation - Use Editor methods for the currently open note These features belong in feature/todoist-multi-project branch. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When parsing Todoist due dates, new Date('YYYY-MM-DD') interprets the
date as UTC midnight, causing incorrect filtering for users in non-UTC
timezones (e.g., Mountain Standard Time).
Added parseLocalDate() helper that splits the ISO date string and creates
a Date using local timezone (new Date(year, month, day)).
Fixes issue where 'today' filter was returning tomorrow's tasks.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@dbludeau both are fixed. The heading issue was a mistake--this code should be part of a separate feature enhancement (multiple projects per note), so I moved that code to a different branch. The timezone glitch was definitely a bug; should. be fixed now |
|
I also put a description of this feature into the first comment of the PR |
Date Filtering for Todoist Project Syncs
This branch adds the ability to filter which Todoist tasks are synced based on their due dates.
New Commands
/todoist sync project todaytospt/todoist sync project overduetospo/todoist sync project currenttospcThe existing
/todoist sync projectcommand now respects the date filter setting.New Settings
all,today,overdue | today,3 days, or7 daysPer-Note Filtering
You can override the global setting for individual notes using frontmatter:
Valid filter values: all, today, overdue, current (overdue + today), 3 days, 7 days