Open Sobak opened 8 years ago
Can you explain the idea of cyclic events a little bit more?
I can think of many possible events which are regularly repeatable over the time, e.g. someone's bithday or regular doctor appointment.
Let's put technical aspects aside, for a moment. There are two questions I'd like to answer before the potential implementation takes place:
parent_id
This idea was somehow inspired by https://github.com/mtdowling/cron-expression but I'm certainly sure it should belong to the core. Probably I'd like to keep it less-packed with features and implement that as a plugin.
I think that repetitive event should be one structure, i.e. "shopping every Sunday", but with the ability to extract specific one, for example we have this shopping event, but we want to cancel not the whole repetitive event, but this one that takes place in two weeks. I have similar feature in my smartphone's alarm app (image at the end).
Deleting specific event IMO should NOT delete whole repetitive event, but deleting the whole repetitive event SHOULD delete every future event, but leave past ones.
Technically this could be solved by i.e.:
repetitive_event
table with fields: id
, from
, to
(nullable for infinite), frequency
, for example: daily, every 5th day, every Sunday, every 5 days etc.particular_event
table with fields: id
, repetitive_id
and other mutator fields.