Open Arbitrate3280 opened 3 years ago
I haven't thought of this possibility, but yeah I definitely see this as being useful.
From the implementation side of things, I don't think I would be a big problem. Without giving it much of a thought, we could get the recurrence of each of the terms (every Monday, every Sunday) and select the closest one. One tiny problem could be parsing the quickadd entry. Should it be every:Monday every:Sunday
to set multiple terms?
I'll tag @nekohayo for his thoughts.
@zeddo123 we were recently talking about something related to this in the chat. @jaesivsm mentioned bringing in dateutil, which has support for caldav recurrency-rules: https://dateutil.readthedocs.io/en/stable/rrule.html
I've never heard of it. That's really cool, I was preparing to refactor that part of the code base but with this package it's going to be to breeze. :smile:
@zeddo123 a refactor? We need to get together in the chat one day, you, me and @jaesivsm to coordinate things. I've also been slowly working on the new core: https://github.com/getting-things-gnome/gtg/blob/new_core/GTG/core/tasks2.py
a refactor?
a refactor-ish. While looking out for bugs just before the release, I've seen things (mostly how I was getting the new occurrence) that could be improved.
We need to get together in the chat one day, you, me and @jaesivsm to coordinate things.
Okay, we just agree on the time.
Hey guys, I'm usually around on IRC but don't get any notifications. I can take some time anywhere between 9AMUTC+2/9PMUTC+2 to discuss that.
You can take a look at the diff here, my intent was replacing the whole recurring_term
+ recurring_enabled
+ recurring_updated_date
by a dateutil.rrule.rrule
objects. It would have the following benefit :
rrule().after(<datetime>)
method which handles the whole get_next_occurence
logic in a one linerI didn't touch it recently, but it needs :
new-dates
branch to master beforehandRecursionRule
class)task.recursion_rule
denorm to children logic which got dropped in the process Date._parse*
methods in the process alsoI haven't thought of this possibility, but yeah I definitely see this as being useful. From the implementation side of things, I don't think I would be a big problem. Without giving it much of a thought, we could get the recurrence of each of the terms (every Monday, every Sunday) and select the closest one. One tiny problem could be parsing the quickadd entry. Should it be
every:Monday every:Sunday
to set multiple terms?
I guess the feature is a bit niche overall, because someone could simply have a task that repeats "daily" and then use the "Do it tomorrow" button to skip days where they don't want to do it, but fine, if it's easily doable on the backend and frontend... I could imagine the UI having checkboxes instead of regular menuitems for the weekly recurrence thing. As for the quick add syntax, yeah I guess it could support "every:Monday every:Sunday
to set multiple terms", and/or every:Monday,sunday
(commas, and case insensitive of course)?
Right now your options for recurring tasks are these: Daily, Every other day, weekly, monthly and yearly.
The weekly option only allows you to choose one day. Would it be possible to allow users to choose multiple days?
Like if I wanted a task to repeat every Monday, Tuesday and Wednesday? Or any other combination. My real life use of this would go like this: I study with Anki 6 days a week, taking Saturdays off. So I would be able to go on Task > Set it to repeat > Weekly > Select: On Monday, Tuesday, Wednesday, Thursday, Friday and Sunday, leaving Saturday out.