j-palindrome / obsidian-time-ruler

A drag-and-drop time ruler combining the best of a task list and a calendar view (integrates with Tasks, Full Calendar, and Dataview).
MIT License
215 stars 7 forks source link

Add repeats to tasks #5

Closed j-palindrome closed 10 months ago

j-palindrome commented 1 year ago

Currently the plugin doesn't support adding repeats; this will be added soon.

claremacrae commented 1 year ago

Hi @joshuatazrein

You really don’t wanna be writing your own code for this. There are so many edge cases and problem cases.

if you wanna work with me to expose the Tasks recurrence code in a way that can be reused by other plugins, please send me an email (see profile here) to set up a session.

I have been looking for a plugin author to work with on this for some time.

claremacrae commented 1 year ago

Here is an example issue that needs to be dealt with.

https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1087

j-palindrome commented 1 year ago

@claremacrae This is definitely an important issue—thanks for mentioning it! Does Tasks currently expose any code that can be used by other plugins, similar to how Dataview adds a window.dv object? This would be a very useful feature for the Obsidian ecosystem, and I would be interested in helping with this.

What library is used for repeats? Would a simple DateTime.plus({months: x}) with Luxon do the trick? Not sure which library is used by this. Task repeats have always been something difficult—repeating on check vs. from scheduled date etc. I have some free time in August and would be interested in pitching in.

claremacrae commented 1 year ago

Hi @joshuatazrein, thanks for replying!

Would a simple DateTime.plus({months: x}) with Luxon do the trick

No. In case you haven't seen it, here are the docs for the variety of supported recurrence patterns in Tasks: Recurring Tasks.

And here is the code: https://github.com/obsidian-tasks-group/obsidian-tasks/blob/main/src/Recurrence.ts

You really, really don't want to be replicating it, I promise!

I do have some time in August. July and September are pretty much full. Best to book a time slot sooner rather than later!

claremacrae commented 1 year ago

Oh, and as per the docs, the library used is rrule: https://github.com/jakubroztocil/rrule

pcause commented 1 year ago

tasks also have an api so that you can use the tasks modal for opening/editing a task. You might look at using that as for tasks plugin users it would be a welcome option.

pcause commented 11 months ago

encourage you to email Clare and see if she can get you an API for recurrence. As she says, lots of weird edge cases. And she support things like "when done" or strict (from original dates) recurrence.

claremacrae commented 11 months ago

encourage you to email Clare and see if she can get you an API for recurrence. As she says, lots of weird edge cases. And she support things like "when done" or strict (from original dates) recurrence.

Unfortunately the time slots I mentioned earlier have passed.... And I'm pretty much at full capacity now with pairing with other people who are making contributions to the Tasks code.

So I'm very happy to set up a slot, but it will be starting from November now...

pcause commented 11 months ago

shame. perhaps the approach is for the developer to use the code and make it an API that he can submit back as a pull request. he can use it in time-ruler and when the pull request is accepted can remove the code from time-ruler. a win-win for both tasks and time-ruler.

claremacrae commented 11 months ago

shame. perhaps the approach is for the developer to use the code and make it an API that he can submit back as a pull request. he can use it in time-ruler and when the pull request is accepted can remove the code from time-ruler. a win-win for both tasks and time-ruler.

No, that wouldn't work. It would be too inefficient.

claremacrae commented 10 months ago

closed this as completed 16 hours ago

Hi @joshuatazrein, May I ask, is this really "completed" or is this "won't do"??

j-palindrome commented 10 months ago

Added to changelog (that's where I keep processed issues)