Plugin: Repeating To-Dos [MAINTAINERS NEEDED]

Repeating Todos

Repeating todos is looking for a new maintainer. If you are interested, contact @BeatLink

Overview

This plugin allows to-do's in joplin to be repeated based on the to-do alarm date. When a to-do is checked as complete, the todo alarm date is immediately reset to the next recurrence date, and the to-do is unmarked as completed.

This plugin allows to-dos to be repeated every minute, hour, day, week, month and year, based on the to-do alarm date and time. Weekly to-dos can also recur on specific weekdays (eg Mon-Fri or Sun, Sat and Wendesday, etc.) and monthly to-dos can recur on specific weekdays of the month (eg, the first Sunday, the second Friday, the last Tuesday, etc)

The plugin also stops to-dos from being repeated after a certain number of repetitions or after a specific date

Installation

Repeating Todos can be installed from within Joplin by navigating to the plugins page in the settings menu then searching for and installing "Repeating Todos"

Links

19 Likes

+1
I'd really love that !

Not sure, if it is intentional, but it is not in the plugin repo yet. Thus it can't be found from within the desktop app.

Yeah, its still pre alpha, at this point nothing more than the UI. I'll work on it when i can but I struggle with finding free time

Hey i am interested to work on this feature..can i work on it?

Since it's pre-alpha, I don't wanno open issues on github.
Here is my initial findings:

  • nice design, a big like for the idea and initial implementation,
  • when I click on a tab inside the fav window, the underlying note DOES NOT open,
  • it would be nice to have a keyboard shortcut, or a small button to toggle visibility,

Joplin 1.8.1
Fav plugin 1.2.1

Sure thing! I can add you to the repo

1 Like

The UI is more or less complete, now for persistence and logic

1 Like

There is currently a snag in development. The plugin requires newer features of the API than the plugin scaffolding provides.

I am currently waiting on the developers to update the scaffolding generator.

The progress of this issue can be tracked here: The Yeoman plugin scaffold generator is out of date · Issue #4828 · laurent22/joplin · GitHub

Here's the link. Sorry it took so long

Can you add plugins like this to the mobile version of Joplin.

Would be great to see this plugin become integrated into Joplin itself as a native feature.

1 Like

Okay so I have some good news; I've resumed work on the plugin as I really need it myself in my personal life.

The database storage of recurrence data is more or less complete. Next will be to integrate the recurrence dialog with said database. After that, would be to implement the logic to calculate the next date a recurring to-do should be done so the system can revert the done status of a task. And finally, I will need to implement the timer/loop that does the undoing of the task at the right time.

From there on, its documenting, testing, clean-up and publishing!

So I will try to get the dialog and database working together today.

Oh also, I've moved the repo away from GitHub to GitLab. Mainly for privacy and open source reasons but also GitLab is just better to work with.

Here's the new link: Code / joplin-plugin-repeating-todos · GitLab

3 Likes

The database is now tied into the dialog for each note so now the recurrence data for each note can be seen and manipulated, with all changes saved to the database.

furthermore i went ahead and did some major refactoring, documenting and the like, but there is a lot more work to do.

Next will be to clean up the recurrence class and implement the logic for calculating the to-do reset date

1 Like

Happy to report that the recurrence class is now functional. The next step would be to implement the logic for when tasks are completed

1 Like

The code is almost finished now, however there is a slight hiccup as the API will only allow listening to changes of the currently selected note.

Once onNoteChange Event is not emitted for all but the current note · Issue #5197 · laurent22/joplin · GitHub is resolved, then the plugin can be completed

1 Like

good

Ive implemented a workaround for the checking of note changes. The plugin is now feature complete and is ready for alpha testing! I've already taken the liberty to publish it to NPM

Now all that remains is testing, code cleanup and documentation

1 Like

Okay so theres a memory leak somewhere. Looking into it

Hi there @BeatLink ,

I assume the memory leak hasn't been fixed yeat? My ram and cpu are getting devoured and debug console is yelling:

PluginRunner: Got message (3): joplin.data.get ["search"] {query: "iscompleted:1", fields: Array(4), page: 0}

&

PluginRunner: "Got message (3): joplin.data.get", "[["search"],{"query":"iscompleted:1","fields":["id","title","body","todo_completed"],"page":0}]"

And after a few minutes Joplin crashes. Problem's also gone after To-Do is disabled.

Hope I'm not barking the wrong tree, still in babyshoes codingwise.

Cheers!

I'm not sure but in this loop isn't await getCompletedNotes() being executed on each iteration?

export async function reviewCompletedTasks(){
    for (var note of await getCompletedNotes()){                        // For note in completed notes
        await processRecurrence(note)                                   // Process Note
    }
    setInterval(await reviewCompletedTasks, 300000)                     // Run loop again after 60 seconds    
}

Also in this code it will create a new interval every time reviewCompletedTasks() is called and that interval will never be cleared.

Edit: Actually I don't understand what's the intent of this code? It looks like it's going into infinite recursion?