Handling recurring tasks through the API

Hello,

When checking off a task with a recurring due date like !(2020-07-08 | ~4d) in the web interface or app, Dynalist will immediately create a new task with the next due date (or modify the task, depending on user preferences).

This does not work (perhaps obviously) when using the API to mark that same task as done. Now new task will be created (or modification made).

Is this a known and accepted limitation of the API? I can imagine that recreating the same logic serverside may bring its own challenges.

If this is the case then perhaps a note could be added to the API docs, since the system does not work as advertised (for the GUI).

Or if somebody has a trick to share, I’d be very happy to hear it.

Thanks,

_Lasar

You could just do another api call to add the new recurrence item.

I could, but I don‘t think it‘s trivial. I‘d have to write logic to detect recurring tasks in the first place, understand the syntax, then make a date calculation to get the next recurrence, change the text content, and then insert it in the right place, after the last one.

Which is why I‘m hoping that the devs will magically implement all that on the API side :slight_smile:

Hello again,

I’m still working on this front and mullling things over. Perhaps @Erica can shed some light? (Apologies if paging you here isn’t OK, please disregard in that case.)

  • Can/will recurring tasks be handled by the API? (I’m assuming no.)
  • Where would I go to find out every detail about handling of dates including ranges, timezones, recurrence and so on? Looking at the actual code would be perfect (but I understand that’s not necessarily feasible).
  • I am planning to replicate the logic around recurring tasks in my serverside code. For a perfect result I would need to know what the user has selected for the “Preferred behavior to see when recurring dates get checked off” option. Is there a way to retrieve that? (I’m assuming “no” at this point.)

Work on a (JS based) class for parsing and modifying Dynalist date strings has progressed pretty far (for all formats I am aware of). My next stept is to write code for calculating the next recurrence based on the date settings. Then it’s fairly trivial to update the document as desired (minus any necessary limitations). I’m hoping to make the date parsing library public as an NPM module if possible.

Thanks in advance,

_Lasar