Expand description
The Task workflowStatus and progress rule (docs/design/DECISIONS.md
decision 42; jmapio/jmap #465 against draft-ietf-jmap-tasks-06 §4).
-06 says only “Must be one of the TaskList’s workflowStatuses. If set,
progress MUST null”, which leaves a task completed through
workflowStatus looking unfinished to a JSCalendar or iCalendar reader.
Decision 42 replaces it:
- A
workflowStatusthat is one of the RFC 8984 §5.2.5 progress values is mirrored intoprogressby the server; any other value (pending, a list-defined one) leavesprogressnull. A changedprogress, including one the mirror clears, also setsprogressUpdated(RFC 8984 §5.2.6) to the current time, unless the client set it. - Setting
progressto anything else whileworkflowStatusis set isinvalidPropertiesnamingprogress. - A
workflowStatusnot in the task list’sworkflowStatusesisinvalidPropertiesnamingworkflowStatus, on create, when the update sets it, and when the update moves the task to another list. - Changing a list’s
workflowStatusesdoes not touch its tasks: an update that neither setsworkflowStatusnor moves the task is not checked against the list.
apply_workflow_status is the whole rule, on the Task as it would be
stored. A TasksBackend runs it in the same
critical section as the write, so a concurrent change of the list’s
workflowStatuses cannot slip a value past it.
Enums§
- Workflow
Write - How a write reached
apply_workflow_status.
Constants§
- DEFAULT_
WORKFLOW_ STATUSES - draft-ietf-jmap-tasks-06 §3: a
TaskList’sworkflowStatusesdefault, used when the list has none. - PROGRESS_
VALUES - The RFC 8984 §5.2.5
progressvalues that aworkflowStatusmirrors.
Functions§
- apply_
workflow_ status - Apply decision 42 to
task, the Task as it would be stored, in a list whoseworkflowStatusesislist_statuses(None: the list has none, or none is stored, soDEFAULT_WORKFLOW_STATUSES).nowis theUTCDatea server-changedprogressgivesprogressUpdated.