Fix: mark tasks as scheduled when rescheduling during overdue review - #742
Conversation
When scheduling a task to a future date during the overdue task review, handleArrowDatesAction() updated the content with the >date suffix but never changed the paragraph type from 'open' to 'scheduled'. This caused tasks to still appear as active ([ ]) instead of rescheduled ([>]). This matches the behavior already implemented in scheduleItem() in helpers/NPScheduleItems.js.
Marking an item 'scheduled'/'checklistScheduled' on its own is not enough: in NotePlan a [>] line means "handled elsewhere", so it does NOT appear in the target date's references. Setting the type without also adding a copy in the destination note made rescheduled items disappear from the new date. handleArrowDatesAction() now routes through the existing helpers in helpers/NPScheduleItems.js, mirroring jgclark.Dashboard::doRescheduleItem(): - items in regular notes always use scheduleItemLiteMethod() (rewrite the >date in place, leave the type alone) -- which is also what NotePlan's "Schedule by linking in regular notes" preference does - items in calendar notes use scheduleItem(), which marks the original '[>] task >newDate' and adds '[ ] task <origDate' to the destination calendar note, unless the new useLiteScheduleMethod setting is set - the CMD-modifier path is unchanged; that's a move, not a reschedule Adds useLiteScheduleMethod, newTaskSectionHeading and newTaskSectionHeadingLevel settings, mirroring the Dashboard plugin. Fixes NotePlan#741 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks for this @badrbouslikhin — you found a real bug, and the diagnosis is right: Why the type change alone would have made things worseIn NotePlan, So with the original patch, rescheduling an overdue task to next Tuesday would have marked it The The two always happen together. That is why What the follow-up commit does
Three settings come along, mirroring the Dashboard plugin: TestsThe existing One thing worth a second opinionThe default is |
|
Thanks for the feedback and the fix! |
Summary
handleArrowDatesAction()updated the content with the>datesuffix but never changed the paragraph type fromopentoscheduled[ ]) instead of rescheduled ([>])scheduleItem()inhelpers/NPScheduleItems.jsTest plan
[ ]to[>]Fixes #741