Add @done(date) annotation and optional due-date support to task lines #17

Closed
opened 2026-06-10 18:27:06 +02:00 by fpindado · 1 comment
Owner

Extend the SP→MD sync to write status annotations at the end of task lines,
consistent with the tag model defined in the Future Direction doc.

@done(YYYY-MM-DD) — completion date (written by the plugin)

When a task is marked as done in SP, append a @done(YYYY-MM-DD) annotation
at the end of the corresponding line in the Markdown file.

  • Source field: task.doneOn (Unix timestamp in ms, available in current SP plugin API)
  • Written during SP→MD sync
  • The due-date tag (@todo(date) / @doing(date)) is dropped when the task is completed,
    since @done(date) replaces it

Example:

  • Fix login redirect @done(2026-06-23)

Reopen behaviour (un-done)

When a completed task is reopened in SP, revert to @todo with no date.

The SP plugin API does not currently expose task.dueDate, so the due date cannot
be recovered automatically. If SP adds that field to the API in a future version,
the behaviour should be updated to write @todo(date) / @doing(date) instead,
recovering the original due date from SP's database.

@todo(date) and @doing(date) — due dates (user-managed, no plugin change needed)

These annotations can be added manually by the user in the Markdown file.
The SP→MD in-place merge already preserves all non-checkbox content verbatim,
so they survive write-backs without any code change.

Example:

  • Submit Q2 report @todo(2026-07-01)
  • Review pull request @doing(2026-06-28)

Full tag model

Tag Set by Meaning
@todo User / app Not started
@todo(YYYY-MM-DD) User / app Not started, with due date
@doing User / app In progress
@doing(YYYY-MM-DD) User / app In progress, with due date
@done(YYYY-MM-DD) Plugin / app Completed — date is when done

Date is preserved on any move between @todo and @doing. When a task moves
to done the due date is dropped. When reopened the task returns to @todo (no date).


To be implemented after the other post-beta features.

Extend the SP→MD sync to write status annotations at the end of task lines, consistent with the tag model defined in the Future Direction doc. ## @done(YYYY-MM-DD) — completion date (written by the plugin) When a task is marked as done in SP, append a `@done(YYYY-MM-DD)` annotation at the end of the corresponding line in the Markdown file. - Source field: `task.doneOn` (Unix timestamp in ms, available in current SP plugin API) - Written during SP→MD sync - The due-date tag (`@todo(date)` / `@doing(date)`) is dropped when the task is completed, since `@done(date)` replaces it Example: - [x] Fix login redirect @done(2026-06-23) ## Reopen behaviour (un-done) When a completed task is reopened in SP, revert to `@todo` with no date. The SP plugin API does not currently expose `task.dueDate`, so the due date cannot be recovered automatically. If SP adds that field to the API in a future version, the behaviour should be updated to write `@todo(date)` / `@doing(date)` instead, recovering the original due date from SP's database. ## @todo(date) and @doing(date) — due dates (user-managed, no plugin change needed) These annotations can be added manually by the user in the Markdown file. The SP→MD in-place merge already preserves all non-checkbox content verbatim, so they survive write-backs without any code change. Example: - [ ] Submit Q2 report @todo(2026-07-01) - [ ] Review pull request @doing(2026-06-28) ## Full tag model | Tag | Set by | Meaning | |----------------------|--------------|--------------------------------| | `@todo` | User / app | Not started | | `@todo(YYYY-MM-DD)` | User / app | Not started, with due date | | `@doing` | User / app | In progress | | `@doing(YYYY-MM-DD)` | User / app | In progress, with due date | | `@done(YYYY-MM-DD)` | Plugin / app | Completed — date is when done | Date is preserved on any move between `@todo` and `@doing`. When a task moves to done the due date is dropped. When reopened the task returns to `@todo` (no date). --- To be implemented after the other post-beta features.
fpindado changed title from Add @completed(date) annotation to completed task lines to Add @done(date) annotation to completed task lines 2026-06-25 11:40:02 +02:00
fpindado changed title from Add @done(date) annotation to completed task lines to Add @done(date) annotation and optional due-date support to task lines 2026-06-26 10:06:23 +02:00
Author
Owner

Included in v0.2.1

Included in v0.2.1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fpindado/sync-md-multi#17
No description provided.