Master tasks and subtasks

Since 1.24.0 (#152206) a task can be a subtask of a master task. LH_Tasks_subtasks_class (includes/lh-tasks-subtasks-class.php) owns the relationship, the rollup and Markdown checklist rendering.

Relationship

Who can see a master

Since 1.25.0 (#152259) LH_Tasks_visibility_class::current_user_can_view_task() also lets anyone who is the hard assignment or claimant of one of a task’s subtasks read it. A master is usually left unassigned for staff while its subtasks go to one person (a captain, say), and the email they get links to the master, which they could not open before.

Rollup

LH_Tasks_status_table_class::set_status() fires lh_tasks_task_status_changed ($post_id, $status, $from_status) on every workflow change. When a subtask changes, or is trashed, its open master is recomputed:

Task page

The task page is written for the person doing the work, who is often new to the system (1.25.0, #152259).

Admin

The Tasks list has a Subtasks column: Part of the master on a subtask, or N of M done on a master, linking to edit.php?post_type=lh_tasks-task_post&lh_tasks_parent=ID, which lists that master’s subtasks. Setting the master from the block editor sidebar is not available yet: use the abilities.