Rollover Daily Todos with Context

by Michael Parker
5
4
3
2
1
Score: 35/100

Description

This plugin has not been manually reviewed by Obsidian staff. Rollover any unchecked checkboxes from your last daily note into today's note, with context.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
1
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Rollover Daily Todos

This Obsidian plugin will rollover any incomplete todo items from the previous daily note (could be yesterday, or a week ago) to today. This is triggered automatically when a new daily note is created via the internal Daily notes plugin, or the Periodic Notes plugin., It can also be run as a command from the Command Palette.

Usage

1. New Daily Note

Just create a new daily note using the Daily notes or Periodic Notes plugin. The previous day's incomplete todos will be rolled over to today's daily note.

Note: Automatic rollover can cause conflicts with other plugins, particularly the Templater plugin. If you're using Templater for your daily notes, it's recommended that you disable automatic rollover in the plugin's settings and instead trigger it manually after creation.

2. Command: Manual Rollover Todos Now

You can also open your command palette (CMD+P on macOS) and start typing roll to find this command. No matter where you are in Obsidian, the previous day's todos will get rolled forward. There is also a command called Undo last rollover which can be run within 2 minutes of a rollover occurring. Both commands are potentially destructive, and the default text element undo command (CMD+Z on macOS) didn't work. Currently only 1 undo is available for use at the moment.

Note that if you create a daily note in the future, and you try to run this command, todos will not be rolled into a future date. They will always be rolled to today's note (if it doesn't exist, nothing will happen), from the chronologically closest (in the past) daily note.

Automatic rollover and Rollover Todos Now only pull unfinished todos from that one previous daily note (the latest daily note before today).

3. Command: Rollover todos from all previous daily notes

Use Rollover todos from all previous daily notes (command palette) to collect open todos from every daily note dated before today, oldest days first, and append them to today's daily note in one pass. If the same parent todo line appears on multiple days, it is only rolled once (the earliest occurrence wins).

Your Previous day todo behavior setting applies to each source note that contributed todos: duplicate keeps sources unchanged; delete removes contributed lines from those notes; forward rewrites each contributing note’s parent lines as [>] with backlinks.

4. Command: Move completed todos to bottom of each section

With your daily note open in the editor, run Move completed todos to bottom of each section from the command palette.

The plugin walks every ATX heading (#######) in the file. Under each heading, it takes lines until the next heading of the same or higher level, and moves completed checkbox tasks (per Done status markers) to the bottom of that section, below incomplete todos and other lines (paragraphs, bullets without checkboxes, nested headings as plain lines, etc.). Deeper headings (### inside ##) are handled first, then outer sections, so nested lists stay coherent. Nested lines under a completed todo move with it when Roll over children of todos is enabled.

Unheaded lists (for example broad todos at the top or bottom of the note, before the first heading or after the last section) are handled too: each run of lines separated from the next by a blank line is treated as its own list, and completed todos move to the bottom of that run only.

Blank lines that only sat between two checkbox todos are removed so items stay flush; leading blank lines directly under a heading (often introduced when reordering) are trimmed so the list can sit right under the heading when there is no other content in between.

Requirements

  • You must have either:
    1. Daily notes plugin installed or
    2. Periodic Notes plugin installed AND the Daily Notes setting toggled on
  • A Note folder set in one of these plugins. Inside it you must have:
    1. 2 or more notes
    2. All notes must be named in the format you use for daily notes (for example 2021-08-29 for YYYY-MM-DD )

Settings

1. Disable automatic rollover

If you prefer to trigger the rollover of your todos manually, you can use this setting to prevent the plugin from rolling them over when a new note is created.

2. Template Heading

If you chose a template file to use for new daily notes in Daily notes > Settings or Periodic Notes > Settings, you will be able to choose a heading for incomplete notes to roll into. Note that incomplete todos are taken from the entire file, regardless of what heading they are under. And they are all rolled into today's daily note, right under the heading of choice.

If you leave this field as blank, or select None, then incomplete todos will be rolled onto the end of today's note (for new notes with no template, the end is the beginning of the note).

3. Previous day todo behavior

By default, this plugin duplicates incomplete todos. That means the unfinished task stays on yesterday's daily note and a copy is added to today's note.

You can choose one of three behaviors:

  • Duplicate (default): Keep yesterday's todos and copy them into today.
  • Delete: Remove rolled todos from the previous day after they are added to today's note. This is destructive.
  • Mark todos as forwarded: Only applies to open tasks whose checkbox is a single space: - [ ] (same for */+ list markers). Other incomplete markers (for example - [/] from Tasks) are not forwarded; neither are lines already marked - [>]. The plugin turns eligible lines into - [>], appends (forwarded to [[today-note]]), and adds (forwarded from [[previous-note]]) on today's copy.

If you use the Undo last rollover command, both note files are restored to their pre-rollover state (within the 2-minute undo window).

4. Remove empty todos in rollover

By default, this plugin will roll over anything that has a checkbox, whether it has content or not. Toggling this setting on will ignore empty todos. If you have #3 from above toggled on, it will also delete empty todos.

5. Roll over children of todos

By default, only the actual todos are rolled over. If you add nested Markdown elements beneath your todos, these are not rolled over but stay in place. Toggling this setting on allows for also migrating the nested elements, including ones that are completed.

6. Done status markers

By default, the plugin considers checkboxes containing 'x', 'X', or '-' as completed tasks that won't be rolled over. You can customize this by adding any characters that should be considered "done" markers. For example, adding '?+>' would also treat checkboxes like '[?]', '[+]', and '[>]' as completed tasks. This is useful for users of custom status markers like the Obsidian Tasks plugin.

Tasks already marked forwarded (- [>]) are never treated as unfinished todos, so they are not rolled again.

The plugin supports Unicode characters, including complex emoji and grapheme clusters, in checkbox content. This means you can use emojis or special Unicode characters as status markers and they will be handled correctly.

Bugs/Issues

  1. Sometimes you will use this plugin, and your unfinished todos will stay in the same spot. These could be formatting issues.
  • Regex is used to search for unfinished todos: /\s*[-*+] \[[^xX-]\].*/g (or with your custom done markers)
  • At a minimum, they need to look like: start of line | tabs- [ ]Your text goes here
  • If you use spaces instead of tabs at the start of the line, the behavior of the plugin can be inconsistent. Sometimes it'll roll items over, but not delete them from the previous day when you have that option toggled on.
  1. Sometimes, if you trigger the rollover function too quickly, it will read the state of a file before the new data was saved to disk. For example, if you add a new incomplete todo to yesterday's daily note, and then quickly run the Rollover Todos Now command, it may grab the state of the file a second or two before you ran the command. If this happens, just run the Undo last rollover command. Wait a second or two, then try rolling over todos again.

For example (no template heading, empty todos toggled on):

You type in:

- [x] Do the dishes
- [ ] Take out the trash

And then you run the Rollover Todos Now command. Today's daily note might look like:

- [ ] Take out the trash

And the previous day might look like

- [x] Do the dishes
  1. There are sometimes conflicts with other plugins that deal with new notes -- particularly the Templater plugin. In these situations, your todos may be removed from your previous note, and then not be saved into your new daily note. The simplest remedy is to disable the automatic rollover, and instead trigger it manually.

Installation

Manual install (from this repository)

Use this when you are developing locally or installing from a Git clone instead of the Community Plugins browser.

  1. Clone or download this repo and open a terminal in the project root.
  2. Install dependencies and build the bundled plugin entrypoint:
 npm install
 npm run build

This generates **main.js** in the project root (alongside manifest.json). 3. Copy the plugin into your vault. Obsidian loads plugins from the hidden .obsidian folder inside each vault. Create a folder named after the plugin id (see manifest.json, "id": "rollover-daily-todos-with-context"):

 <YourVault>/.obsidian/plugins/rollover-daily-todos-with-context/

Copy at least these files into that folder:

  • manifest.json
  • main.js
  1. Enable the plugin in Obsidian: Settings → Community plugins → turn off Restricted mode if prompted → find Rollover Daily Todos and enable it. Restart Obsidian if it does not appear.

Development tip: To avoid copying after every change, symlink your repo into that plugins path (same folder name as above), then run npm run build after edits and reload the plugin or restart Obsidian.

Community Plugins

You can also install released versions from Obsidian’s Community Plugins tab when this plugin is listed there (search for Rollover Daily Todos).

Releasing

Maintainers should follow RELEASING.md when cutting a new version.

Attribution

This plugin is maintained by Michael Parker. It extends Rollover Daily Todos by Lukas Mölschl, which built on the original rollover-daily-todos idea by Matthew Sessions.