Instances
A table containing one entry per task instance. This table is writable in order to allow modification of single instances of a task. Write operations to this table will be converted into operations on overrides and forwarded to the task table.
Note: The DTSTART, DUE values of instances of recurring tasks represent the actual instance values, i.e. they are different for each instance (DURATION is always null
).
Also, none of the instances are recurring themselves, so RRULE, RDATE and EXDATE are always null
.
TODO: Insert all instances of recurring tasks.
The following operations are supported:
Insert
Note, the data of an insert must not contain the fields RRULE, RDATE or EXDATE. If the new instance belongs to an existing task the data must contain the fields ORIGINAL_INSTANCE_ID and ORIGINAL_INSTANCE_TIME. Also note, this table supports writing DURATION (if the instance has a DTSTART), but reading it back will always return a null
DURATION and a non-null
DUE date. Reading the task in the tasks table will, however, return the original DURATION.
If there already is an instance (with or without override) for the given ORIGINAL_INSTANCE_ID and ORIGINAL_INSTANCE_TIME an exception is thrown.
absent or empty | A new non-recurring task is created with the given values. |
a valid Tasks row _ID | An RDATE for the given ORIGINAL_INSTANCE_TIME time is added to the given master task, any EXDATE for this time is removed. The task is inserted as an override to the given master. No fields are inherited though. ORIGINAL_INSTANCE_ALLDAY will be set to IS_ALLDAY of the master. Note, if the given master is non-recurring, this operation will turn it into a recurring task. |
invalid Tasks row
_ID | An exception is thrown. |
Update
Note, the data of an update must not contain any fields related to recurrence (RRULE, RDATE, EXDATE, ORIGINAL_INSTANCE_ID, ORIGINAL_INSTANCE_TIME and ORIGINAL_INSTANCE_ALLDAY). Also note, this table supports writing DURATION (if the instance has a DTSTART), but reading it back will always return a null
DURATION and a non-null
DUE date. Reading the task in the tasks table will, however, return the original DURATION.
Recurring master task | A new override is created with the given data. Note, any fields which are not provided are inherited from the master, except for DTSTART and DUE which will be inherited from the instance and DURATION, RRULE, RDATE and EXDATE which are set to |
Single instance task | The task is updated with the given values. |
Recurrence override with existing master | The task is updated with the given values. |
Recurrence override without existing master | The task is updated with the given values. |
Delete
Recurring master task | An EXDATE for this instance is added, any RDATE for this instance is removed. The instance row is removed. TODO: mark the task deleted if the remaining recurrence set is empty |
Single instance task | The _DELETED flag of the task is set. |
Recurrence override with existing master | The _DELETED flag of the override is set, an EXDATE for this instance is added to the master, any RDATE for this instance is removed from the master. TODO: mark the master deleted if the remaining recurrence set of the master is empty |
Recurrence override without existing master | The _DELETED flag of the task is set. |
Author
Yannic Ahrens
Marten Gajda
Properties
null
if the instance has no due date.null
if the instance has only one of start or due date or none of both.null
if the instance has no start date.null
otherwise.null
otherwise.null
if this task is not a recurring instance.null
.null
to use LIST_COLOR instead.